Skip to content

Commit

Permalink
[irods#7545,irods#7546] Ensure clang[-runtime] package added to depen…
Browse files Browse the repository at this point in the history
…dencies
  • Loading branch information
SwooshyCueb authored and alanking committed Mar 6, 2024
1 parent 03da95c commit 47a8699
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
8 changes: 0 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ endif()
include(IrodsExternals)
include(IrodsCXXCompiler)

macro(IRODS_MACRO_CHECK_DEPENDENCY_SET_FULLPATH_ADD_TO_IRODS_DEVELOP_DEPENDENCIES_LIST DEPENDENCY_NAME DEPENDENCY_SUBDIRECTORY)
IRODS_MACRO_CHECK_DEPENDENCY_SET_FULLPATH(${DEPENDENCY_NAME} ${DEPENDENCY_SUBDIRECTORY})
list(APPEND IRODS_DEVELOP_DEPENDENCIES_LIST irods-externals-${DEPENDENCY_SUBDIRECTORY})
endmacro()

IRODS_MACRO_CHECK_DEPENDENCY_SET_FULLPATH_ADD_TO_IRODS_PACKAGE_DEPENDENCIES_LIST(ARCHIVE libarchive3.5.2-0)
IRODS_MACRO_CHECK_DEPENDENCY_SET_FULLPATH_ADD_TO_IRODS_PACKAGE_DEPENDENCIES_LIST(AVRO avro1.11.0-2)
IRODS_MACRO_CHECK_DEPENDENCY_SET_FULLPATH_ADD_TO_IRODS_PACKAGE_DEPENDENCIES_LIST(BOOST boost1.81.0-0)
Expand All @@ -33,9 +28,6 @@ IRODS_MACRO_CHECK_DEPENDENCY_SET_FULLPATH_ADD_TO_IRODS_DEVELOP_DEPENDENCIES_LIST
IRODS_MACRO_CHECK_DEPENDENCY_SET_FULLPATH_ADD_TO_IRODS_DEVELOP_DEPENDENCIES_LIST(JSON json3.10.4-0)
IRODS_MACRO_CHECK_DEPENDENCY_SET_FULLPATH_ADD_TO_IRODS_DEVELOP_DEPENDENCIES_LIST(SPDLOG spdlog1.9.2-1)

string(REPLACE ";" ", " IRODS_PACKAGE_DEPENDENCIES_STRING "${IRODS_PACKAGE_DEPENDENCIES_LIST}")
string(REPLACE ";" ", " IRODS_DEVELOP_DEPENDENCIES_STRING "${IRODS_DEVELOP_DEPENDENCIES_LIST}")

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_EXTENSIONS OFF)
set(IRODS_CXX_STANDARD "${CMAKE_CXX_STANDARD}")
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/IrodsCXXCompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set(IRODS_BUILD_WITH_CLANG ON CACHE BOOL "Try to build with clang instead of gcc
set(CLANG_STATIC_ANALYZER OFF CACHE BOOL "Choose whether to run Clang Static Analyzer.")

if (IRODS_BUILD_WITH_CLANG)
IRODS_MACRO_CHECK_DEPENDENCY_SET_FULLPATH(CLANG clang13.0.1-0)
IRODS_MACRO_CHECK_DEPENDENCY_SET_FULLPATH_ADD_TO_IRODS_DEVELOP_DEPENDENCIES_LIST(CLANG clang13.0.1-0)
else()
set(CLANG_STATIC_ANALYZER OFF CACHE BOOL "Choose whether to run Clang Static Analyzer." FORCE)
message(STATUS "Setting CLANG_STATIC_ANALYZER to 'OFF'.")
Expand Down
14 changes: 13 additions & 1 deletion cmake/Modules/IrodsExternals.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ endmacro()

macro(IRODS_MACRO_CHECK_DEPENDENCY_SET_FULLPATH_ADD_TO_IRODS_PACKAGE_DEPENDENCIES_LIST VAR DEPENDENCY_SUBDIRECTORY)
IRODS_MACRO_CHECK_DEPENDENCY_SET_FULLPATH(${VAR} ${DEPENDENCY_SUBDIRECTORY})
list(APPEND IRODS_PACKAGE_DEPENDENCIES_LIST irods-externals-${DEPENDENCY_SUBDIRECTORY})
set(__externals_package_name "irods-externals-${DEPENDENCY_SUBDIRECTORY}")
if (NOT __externals_package_name IN_LIST IRODS_PACKAGE_DEPENDENCIES_LIST)
list(APPEND IRODS_PACKAGE_DEPENDENCIES_LIST "${__externals_package_name}")
endif()
unset(__externals_package_name)
endmacro()

macro(IRODS_MACRO_CHECK_DEPENDENCY_SET_FULLPATH_ADD_TO_IRODS_DEVELOP_DEPENDENCIES_LIST DEPENDENCY_NAME DEPENDENCY_SUBDIRECTORY)
IRODS_MACRO_CHECK_DEPENDENCY_SET_FULLPATH(${DEPENDENCY_NAME} ${DEPENDENCY_SUBDIRECTORY})
set(__externals_package_name "irods-externals-${DEPENDENCY_SUBDIRECTORY}")
if (NOT __externals_package_name IN_LIST IRODS_DEVELOP_DEPENDENCIES_LIST)
list(APPEND IRODS_DEVELOP_DEPENDENCIES_LIST irods-externals-${DEPENDENCY_SUBDIRECTORY})
endif()
unset(__externals_package_name)
endmacro()
2 changes: 1 addition & 1 deletion cmake/Modules/UseLibCXX.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ set(IRODS_BUILD_AGAINST_LIBCXX ${IRODS_BUILD_AGAINST_LIBCXX_DEFAULT} CACHE BOOL

if (IRODS_BUILD_AGAINST_LIBCXX)
include(IrodsExternals)
IRODS_MACRO_CHECK_DEPENDENCY_SET_FULLPATH(CLANG clang13.0.1-0)
IRODS_MACRO_CHECK_DEPENDENCY_SET_FULLPATH_ADD_TO_IRODS_DEVELOP_DEPENDENCIES_LIST(CLANG clang13.0.1-0)
IRODS_MACRO_CHECK_DEPENDENCY_SET_FULLPATH_ADD_TO_IRODS_PACKAGE_DEPENDENCIES_LIST(CLANG_RUNTIME clang-runtime13.0.1-0)
unset(IRODS_PACKAGE_DEPENDENCIES_STRING)
string(REPLACE ";" ", " IRODS_PACKAGE_DEPENDENCIES_STRING "${IRODS_PACKAGE_DEPENDENCIES_LIST}")
Expand Down
4 changes: 4 additions & 0 deletions cmake/packaging.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# We need to define everything for CPack at the top level of the project.
# Variables defined in CMake files included via add_subdirectory don't make it back to the calling CMake file.

# Dependency declarations for externals packages
string(REPLACE ";" ", " IRODS_PACKAGE_DEPENDENCIES_STRING "${IRODS_PACKAGE_DEPENDENCIES_LIST}")
string(REPLACE ";" ", " IRODS_DEVELOP_DEPENDENCIES_STRING "${IRODS_DEVELOP_DEPENDENCIES_LIST}")

# We build multiple packages, so this doesn't really matter.
# We define it anyway to avoid potential issues.
set(CPACK_PACKAGE_FILE_NAME "irods")
Expand Down

0 comments on commit 47a8699

Please sign in to comment.