diff --git a/BLOSC/config/cmake/H5BLOSCMacros.cmake b/BLOSC/config/cmake/H5BLOSCMacros.cmake index 9e22bdb8..8accebfc 100644 --- a/BLOSC/config/cmake/H5BLOSCMacros.cmake +++ b/BLOSC/config/cmake/H5BLOSCMacros.cmake @@ -24,22 +24,19 @@ macro (EXTERNAL_BLOSC_LIBRARY compress_type) URL_HASH "" ) endif () - FetchContent_GetProperties(BLOSC) - if(NOT blosc_POPULATED) - FetchContent_Populate(BLOSC) - set (BUILD_SHARED OFF CACHE BOOL "" FORCE) - set (BUILD_TESTS OFF CACHE BOOL "" FORCE) - set (BUILD_FUZZERS OFF CACHE BOOL "" FORCE) - set (BUILD_BENCHMARKS OFF CACHE BOOL "" FORCE) - set (PREFER_EXTERNAL_SNAPPY OFF CACHE BOOL "" FORCE) - set (PREFER_EXTERNAL_ZLIB OFF CACHE BOOL "" FORCE) - set (PREFER_EXTERNAL_ZSTD OFF CACHE BOOL "" FORCE) - set (DEACTIVATE_SNAPPY ON CACHE BOOL "" FORCE) - set (BLOSC_IS_SUBPROJECT ON CACHE BOOL "" FORCE) - set (BLOSC_INSTALL OFF CACHE BOOL "" FORCE) - add_subdirectory(${blosc_SOURCE_DIR} ${blosc_BINARY_DIR}) - endif() + set (BUILD_SHARED OFF CACHE BOOL "" FORCE) + set (BUILD_TESTS OFF CACHE BOOL "" FORCE) + set (BUILD_FUZZERS OFF CACHE BOOL "" FORCE) + set (BUILD_BENCHMARKS OFF CACHE BOOL "" FORCE) + set (PREFER_EXTERNAL_SNAPPY OFF CACHE BOOL "" FORCE) + set (PREFER_EXTERNAL_ZLIB OFF CACHE BOOL "" FORCE) + set (PREFER_EXTERNAL_ZSTD OFF CACHE BOOL "" FORCE) + set (DEACTIVATE_SNAPPY ON CACHE BOOL "" FORCE) + set (BLOSC_IS_SUBPROJECT ON CACHE BOOL "" FORCE) + set (BLOSC_INSTALL OFF CACHE BOOL "" FORCE) + + FetchContent_MakeAvailable(BLOSC) ##include (${BINARY_DIR}/${BLOSC_PACKAGE_NAME}${H5BLOSC_PACKAGE_EXT}-targets.cmake) set (BLOSC_STATIC_LIBRARY "blosc_static") @@ -69,23 +66,20 @@ macro (EXTERNAL_BLOSC_ZLIB_LIBRARY compress_type) FetchContent_Declare (BLOSC_ZLIB GIT_REPOSITORY ${BLOSC_ZLIB_URL} GIT_TAG ${BLOSC_ZLIB_BRANCH} + PATCH_COMMAND ${CMAKE_COMMAND} -E copy + ${H5BLOSC_SOURCE_DIR}/config/zlib-CMakeLists.txt + /CMakeLists.txt ) elseif (${compress_type} MATCHES "TGZ") FetchContent_Declare (BLOSC_ZLIB URL ${BLOSC_ZLIB_URL} URL_HASH "" + PATCH_COMMAND ${CMAKE_COMMAND} -E copy + ${H5BLOSC_SOURCE_DIR}/config/zlib-CMakeLists.txt + /CMakeLists.txt ) endif () - FetchContent_GetProperties(BLOSC_ZLIB) - if(NOT blosc_zlib_POPULATED) - FetchContent_Populate(BLOSC_ZLIB) - - # Copy an additional/replacement files into the populated source - file(COPY ${H5BLOSC_SOURCE_DIR}/config/zlib-CMakeLists.txt DESTINATION ${blosc_zlib_SOURCE_DIR}) - file(RENAME ${blosc_zlib_SOURCE_DIR}/zlib-CMakeLists.txt ${blosc_zlib_SOURCE_DIR}/CMakeLists.txt) - - add_subdirectory(${blosc_zlib_SOURCE_DIR} ${blosc_zlib_BINARY_DIR}) - endif() + FetchContent_MakeAvailable(BLOSC_ZLIB) set (BLOSC_ZLIB_STATIC_LIBRARY "zlibstat") set (BLOSC_ZLIB_LIBRARY ${BLOSC_ZLIB_STATIC_LIBRARY}) diff --git a/BLOSC/config/cmake/HDFPluginMacros.cmake b/BLOSC/config/cmake/HDFPluginMacros.cmake index b33268e1..4e90e20d 100644 --- a/BLOSC/config/cmake/HDFPluginMacros.cmake +++ b/BLOSC/config/cmake/HDFPluginMacros.cmake @@ -150,10 +150,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -161,10 +161,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/BLOSC/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/BLOSC/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index d2fdb5dd..9dfe4cef 100644 --- a/BLOSC/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/BLOSC/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -97,10 +97,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -138,10 +138,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/BLOSC/src/CMakeLists.txt b/BLOSC/src/CMakeLists.txt index cb89225f..9f4e9e04 100644 --- a/BLOSC/src/CMakeLists.txt +++ b/BLOSC/src/CMakeLists.txt @@ -19,7 +19,7 @@ add_definitions (${HDF5_EXTRA_C_FLAGS}) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC OR (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX)) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")) add_definitions ("-Wno-incompatible-pointer-types") endif () diff --git a/BLOSC2/config/cmake/H5BLOSC2Macros.cmake b/BLOSC2/config/cmake/H5BLOSC2Macros.cmake index 2265ac13..46608ae9 100644 --- a/BLOSC2/config/cmake/H5BLOSC2Macros.cmake +++ b/BLOSC2/config/cmake/H5BLOSC2Macros.cmake @@ -24,28 +24,25 @@ macro (EXTERNAL_BLOSC2_LIBRARY compress_type) URL_HASH "" ) endif () - FetchContent_GetProperties(BLOSC2) - if(NOT blosc2_POPULATED) - FetchContent_Populate(BLOSC2) - set (BUILD_SHARED OFF CACHE BOOL "" FORCE) - set (BUILD_TESTS OFF CACHE BOOL "" FORCE) - set (BUILD_FUZZERS OFF CACHE BOOL "" FORCE) - set (BUILD_BENCHMARKS OFF CACHE BOOL "" FORCE) - # Store the old value of the 'BUILD_EXAMPLES' - set (BUILD_EXAMPLES_OLD ${BUILD_EXAMPLES}) - set (BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) - set (BUILD_PLUGINS OFF CACHE BOOL "" FORCE) - set (BLOSC_IS_SUBPROJECT ON CACHE BOOL "" FORCE) - set (BLOSC_INSTALL OFF CACHE BOOL "" FORCE) - add_subdirectory(${blosc2_SOURCE_DIR} ${blosc2_BINARY_DIR}) - if (WIN32 AND CMAKE_C_COMPILER_ID MATCHES "IntelLLVM") - target_compile_options(blosc2_static PRIVATE -Wno-implicit-function-declaration) - endif () + set (BUILD_SHARED OFF CACHE BOOL "" FORCE) + set (BUILD_TESTS OFF CACHE BOOL "" FORCE) + set (BUILD_FUZZERS OFF CACHE BOOL "" FORCE) + set (BUILD_BENCHMARKS OFF CACHE BOOL "" FORCE) + # Store the old value of the 'BUILD_EXAMPLES' + set (BUILD_EXAMPLES_OLD ${BUILD_EXAMPLES}) + set (BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) + set (BUILD_PLUGINS OFF CACHE BOOL "" FORCE) + set (BLOSC_IS_SUBPROJECT ON CACHE BOOL "" FORCE) + set (BLOSC_INSTALL OFF CACHE BOOL "" FORCE) - # Restore the old value of the parameter - set (BUILD_EXAMPLES ${BUILD_EXAMPLES_OLD} CACHE BOOL "Build EXAMPLES" FORCE) - endif() + FetchContent_MakeAvailable(BLOSC2) + if (WIN32 AND CMAKE_C_COMPILER_ID MATCHES "IntelLLVM") + target_compile_options(blosc2_static PRIVATE -Wno-implicit-function-declaration) + endif () + + # Restore the old value of the parameter + set (BUILD_EXAMPLES ${BUILD_EXAMPLES_OLD} CACHE BOOL "Build EXAMPLES" FORCE) ##include (${BINARY_DIR}/${BLOSC2_PACKAGE_NAME}${H5BLOSC2_PACKAGE_EXT}-targets.cmake) set (BLOSC2_STATIC_LIBRARY "blosc2_static") diff --git a/BLOSC2/config/cmake/HDFPluginMacros.cmake b/BLOSC2/config/cmake/HDFPluginMacros.cmake index b33268e1..4e90e20d 100644 --- a/BLOSC2/config/cmake/HDFPluginMacros.cmake +++ b/BLOSC2/config/cmake/HDFPluginMacros.cmake @@ -150,10 +150,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -161,10 +161,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/BLOSC2/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/BLOSC2/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index d2fdb5dd..9dfe4cef 100644 --- a/BLOSC2/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/BLOSC2/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -97,10 +97,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -138,10 +138,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/BSHUF/config/cmake/H5BSHUFMacros.cmake b/BSHUF/config/cmake/H5BSHUFMacros.cmake index aafa78f5..e0391dc5 100644 --- a/BSHUF/config/cmake/H5BSHUFMacros.cmake +++ b/BSHUF/config/cmake/H5BSHUFMacros.cmake @@ -24,26 +24,22 @@ macro (EXTERNAL_BSHUF_LIBRARY compress_type) URL_HASH "" ) endif () - FetchContent_GetProperties(BSHUF) - if(NOT bshuf_POPULATED) - FetchContent_Populate(BSHUF) - # Store the old value of the 'BUILD_SHARED_LIBS' - set (BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS}) - # Make subproject to use 'BUILD_SHARED_LIBS=OFF' setting. - set (BUILD_SHARED_LIBS OFF CACHE INTERNAL "Build SHARED libraries" FORCE) - # Store the old value of the 'H5PL_BUILD_TESTING' - set (H5PL_BUILD_TESTING_OLD ${H5PL_BUILD_TESTING}) - # Make subproject to use 'H5PL_BUILD_TESTING=OFF' setting. - set (H5PL_BUILD_TESTING OFF CACHE INTERNAL "Build Unit Testing" FORCE) + # Store the old value of the 'BUILD_SHARED_LIBS' + set (BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS}) + # Make subproject to use 'BUILD_SHARED_LIBS=OFF' setting. + set (BUILD_SHARED_LIBS OFF CACHE INTERNAL "Build SHARED libraries" FORCE) + # Store the old value of the 'H5PL_BUILD_TESTING' + set (H5PL_BUILD_TESTING_OLD ${H5PL_BUILD_TESTING}) + # Make subproject to use 'H5PL_BUILD_TESTING=OFF' setting. + set (H5PL_BUILD_TESTING OFF CACHE INTERNAL "Build Unit Testing" FORCE) - add_subdirectory(${bshuf_SOURCE_DIR} ${bshuf_BINARY_DIR}) + FetchContent_MakeAvailable(BSHUF) - # Restore the old value of the parameter - set (H5PL_BUILD_TESTING ${H5PL_BUILD_TESTING_OLD} CACHE BOOL "Build Unit Testing" FORCE) - # Restore the old value of the parameter - set (BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD} CACHE BOOL "Type of libraries to build" FORCE) - endif() + # Restore the old value of the parameter + set (H5PL_BUILD_TESTING ${H5PL_BUILD_TESTING_OLD} CACHE BOOL "Build Unit Testing" FORCE) + # Restore the old value of the parameter + set (BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD} CACHE BOOL "Type of libraries to build" FORCE) # include (${BINARY_DIR}/BSHUF-targets.cmake) set (BSHUF_LIBRARY "bshuf") @@ -80,12 +76,7 @@ macro (EXTERNAL_LZ4_LIBRARY compress_type) URL_HASH "" ) endif () - FetchContent_GetProperties(LZ4) - if(NOT lz4_POPULATED) - FetchContent_Populate(LZ4) - - add_subdirectory(${lz4_SOURCE_DIR} ${lz4_BINARY_DIR}) - endif() + FetchContent_MakeAvailable(LZ4) # include (${BINARY_DIR}/LZ4-targets.cmake) set (LZ4_LIBRARY "lz4") diff --git a/BSHUF/config/cmake/HDFPluginMacros.cmake b/BSHUF/config/cmake/HDFPluginMacros.cmake index b33268e1..4e90e20d 100644 --- a/BSHUF/config/cmake/HDFPluginMacros.cmake +++ b/BSHUF/config/cmake/HDFPluginMacros.cmake @@ -150,10 +150,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -161,10 +161,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/BSHUF/config/cmake/binex/CMakeLists.txt b/BSHUF/config/cmake/binex/CMakeLists.txt index 4418bef5..018f9b99 100644 --- a/BSHUF/config/cmake/binex/CMakeLists.txt +++ b/BSHUF/config/cmake/binex/CMakeLists.txt @@ -42,4 +42,6 @@ endif () #----------------------------------------------------------------------------- # Build examples #----------------------------------------------------------------------------- -add_subdirectory (example) +if (H5PL_BUILD_EXAMPLES) + add_subdirectory (example) +endif () diff --git a/BSHUF/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/BSHUF/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index d2fdb5dd..9dfe4cef 100644 --- a/BSHUF/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/BSHUF/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -97,10 +97,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -138,10 +138,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/BZIP2/config/CMakeLists.txt b/BZIP2/config/CMakeLists.txt index 045824b7..81b1b740 100644 --- a/BZIP2/config/CMakeLists.txt +++ b/BZIP2/config/CMakeLists.txt @@ -103,10 +103,10 @@ endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- -if (CMAKE_COMPILER_IS_GNUCC) +if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () -if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_LOADED) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -114,10 +114,10 @@ endif () # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- -if (CMAKE_COMPILER_IS_GNUCC) +if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () -if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_LOADED) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/BZIP2/config/cmake/H5BZ2Macros.cmake b/BZIP2/config/cmake/H5BZ2Macros.cmake index f3bcb3ef..ea0fcdb4 100644 --- a/BZIP2/config/cmake/H5BZ2Macros.cmake +++ b/BZIP2/config/cmake/H5BZ2Macros.cmake @@ -17,36 +17,34 @@ macro (EXTERNAL_BZ2_LIBRARY compress_type) FetchContent_Declare (BZ2 GIT_REPOSITORY ${BZ2_URL} GIT_TAG ${BZ2_BRANCH} + PATCH_COMMAND ${CMAKE_COMMAND} -E copy + ${H5BZ2_SOURCE_DIR}/config/CMakeLists.txt + /CMakeLists.txt ) elseif (${compress_type} MATCHES "TGZ") FetchContent_Declare (BZ2 URL ${BZ2_URL} URL_HASH "" + PATCH_COMMAND ${CMAKE_COMMAND} -E copy + ${H5BZ2_SOURCE_DIR}/config/CMakeLists.txt + /CMakeLists.txt ) endif () - FetchContent_GetProperties(BZ2) - if(NOT bz2_POPULATED) - FetchContent_Populate(BZ2) - # Copy an additional/replacement files into the populated source - file(COPY ${H5BZ2_SOURCE_DIR}/config/CMakeLists.txt DESTINATION ${bz2_SOURCE_DIR}) + # Store the old value of the 'BUILD_SHARED_LIBS' + set (BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS}) + # Make subproject to use 'BUILD_SHARED_LIBS=OFF' setting. + set (BUILD_SHARED_LIBS OFF CACHE INTERNAL "Build SHARED libraries" FORCE) + # Store the old value of the 'H5PL_BUILD_TESTING' + set (H5PL_BUILD_TESTING_OLD ${H5PL_BUILD_TESTING}) + # Make subproject to use 'H5PL_BUILD_TESTING=OFF' setting. + set (H5PL_BUILD_TESTING OFF CACHE INTERNAL "Build Unit Testing" FORCE) - # Store the old value of the 'BUILD_SHARED_LIBS' - set (BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS}) - # Make subproject to use 'BUILD_SHARED_LIBS=OFF' setting. - set (BUILD_SHARED_LIBS OFF CACHE INTERNAL "Build SHARED libraries" FORCE) - # Store the old value of the 'H5PL_BUILD_TESTING' - set (H5PL_BUILD_TESTING_OLD ${H5PL_BUILD_TESTING}) - # Make subproject to use 'H5PL_BUILD_TESTING=OFF' setting. - set (H5PL_BUILD_TESTING OFF CACHE INTERNAL "Build Unit Testing" FORCE) - - add_subdirectory(${bz2_SOURCE_DIR} ${bz2_BINARY_DIR}) - - # Restore the old value of the parameter - set (H5PL_BUILD_TESTING ${H5PL_BUILD_TESTING_OLD} CACHE BOOL "Build Unit Testing" FORCE) - # Restore the old value of the parameter - set (BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD} CACHE BOOL "Type of libraries to build" FORCE) - endif () + FetchContent_MakeAvailable(BZ2) + # Restore the old value of the parameter + set (H5PL_BUILD_TESTING ${H5PL_BUILD_TESTING_OLD} CACHE BOOL "Build Unit Testing" FORCE) + # Restore the old value of the parameter + set (BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD} CACHE BOOL "Type of libraries to build" FORCE) # include (${BINARY_DIR}/BZ2-targets.cmake) set (BZ2_LIBRARY "bz2-static") diff --git a/BZIP2/config/cmake/HDFPluginMacros.cmake b/BZIP2/config/cmake/HDFPluginMacros.cmake index b33268e1..4e90e20d 100644 --- a/BZIP2/config/cmake/HDFPluginMacros.cmake +++ b/BZIP2/config/cmake/HDFPluginMacros.cmake @@ -150,10 +150,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -161,10 +161,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/BZIP2/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/BZIP2/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index d2fdb5dd..9dfe4cef 100644 --- a/BZIP2/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/BZIP2/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -97,10 +97,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -138,10 +138,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/JPEG/config/CMakeLists.txt b/JPEG/config/CMakeLists.txt index 755db1da..7ff4f103 100644 --- a/JPEG/config/CMakeLists.txt +++ b/JPEG/config/CMakeLists.txt @@ -90,10 +90,10 @@ endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- -if (CMAKE_COMPILER_IS_GNUCC) +if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () -if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_LOADED) set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -101,10 +101,10 @@ endif () # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- -if (CMAKE_COMPILER_IS_GNUCC) +if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () -if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_LOADED) +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_LOADED) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/JPEG/config/cmake/H5JPEGMacros.cmake b/JPEG/config/cmake/H5JPEGMacros.cmake index 9f9f668e..595b9a41 100644 --- a/JPEG/config/cmake/H5JPEGMacros.cmake +++ b/JPEG/config/cmake/H5JPEGMacros.cmake @@ -17,37 +17,37 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type) FetchContent_Declare (JPEG GIT_REPOSITORY ${JPEG_URL} GIT_TAG ${JPEG_BRANCH} + PATCH_COMMAND ${CMAKE_COMMAND} -E copy + ${H5JPEG_SOURCE_DIR}/config/CMakeLists.txt + ${H5JPEG_SOURCE_DIR}/config/jconfig.h.in + ) elseif (${compress_type} MATCHES "TGZ") FetchContent_Declare (JPEG URL ${JPEG_URL} URL_HASH "" + PATCH_COMMAND ${CMAKE_COMMAND} -E copy + ${H5JPEG_SOURCE_DIR}/config/CMakeLists.txt + ${H5JPEG_SOURCE_DIR}/config/jconfig.h.in + ) endif () - FetchContent_GetProperties(JPEG) - if(NOT jpeg_POPULATED) - FetchContent_Populate(JPEG) - # Copy an additional/replacement files into the populated source - file(COPY ${H5JPEG_SOURCE_DIR}/config/CMakeLists.txt DESTINATION ${jpeg_SOURCE_DIR}) - file(COPY ${H5JPEG_SOURCE_DIR}/config/jconfig.h.in DESTINATION ${jpeg_SOURCE_DIR}) + # Store the old value of the 'BUILD_SHARED_LIBS' + set (BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS}) + # Make subproject to use 'BUILD_SHARED_LIBS=OFF' setting. + set (BUILD_SHARED_LIBS OFF CACHE INTERNAL "Build SHARED libraries" FORCE) + # Store the old value of the 'H5PL_BUILD_TESTING' + set (H5PL_BUILD_TESTING_OLD ${H5PL_BUILD_TESTING}) + # Make subproject to use 'H5PL_BUILD_TESTING=OFF' setting. + set (H5PL_BUILD_TESTING OFF CACHE INTERNAL "Build Unit Testing" FORCE) - # Store the old value of the 'BUILD_SHARED_LIBS' - set (BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS}) - # Make subproject to use 'BUILD_SHARED_LIBS=OFF' setting. - set (BUILD_SHARED_LIBS OFF CACHE INTERNAL "Build SHARED libraries" FORCE) - # Store the old value of the 'H5PL_BUILD_TESTING' - set (H5PL_BUILD_TESTING_OLD ${H5PL_BUILD_TESTING}) - # Make subproject to use 'H5PL_BUILD_TESTING=OFF' setting. - set (H5PL_BUILD_TESTING OFF CACHE INTERNAL "Build Unit Testing" FORCE) + FetchContent_MakeAvailable(JPEG) - add_subdirectory(${jpeg_SOURCE_DIR} ${jpeg_BINARY_DIR}) - - # Restore the old value of the parameter - set (H5PL_BUILD_TESTING ${H5PL_BUILD_TESTING_OLD} CACHE BOOL "Build Unit Testing" FORCE) - # Restore the old value of the parameter - set (BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD} CACHE BOOL "Type of libraries to build" FORCE) - endif () + # Restore the old value of the parameter + set (H5PL_BUILD_TESTING ${H5PL_BUILD_TESTING_OLD} CACHE BOOL "Build Unit Testing" FORCE) + # Restore the old value of the parameter + set (BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD} CACHE BOOL "Type of libraries to build" FORCE) # include (${BINARY_DIR}/JPEG-targets.cmake) set (JPEG_LIBRARY "jpeg-static") diff --git a/JPEG/config/cmake/HDFPluginMacros.cmake b/JPEG/config/cmake/HDFPluginMacros.cmake index b33268e1..4e90e20d 100644 --- a/JPEG/config/cmake/HDFPluginMacros.cmake +++ b/JPEG/config/cmake/HDFPluginMacros.cmake @@ -150,10 +150,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -161,10 +161,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/JPEG/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/JPEG/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index d2fdb5dd..9dfe4cef 100644 --- a/JPEG/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/JPEG/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -97,10 +97,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -138,10 +138,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/LZ4/config/cmake/H5LZ4Macros.cmake b/LZ4/config/cmake/H5LZ4Macros.cmake index c6e980f7..6c3b079c 100644 --- a/LZ4/config/cmake/H5LZ4Macros.cmake +++ b/LZ4/config/cmake/H5LZ4Macros.cmake @@ -24,26 +24,22 @@ macro (EXTERNAL_LZ4_LIBRARY compress_type) URL_HASH "" ) endif () - FetchContent_GetProperties(LZ4) - if(NOT lz4_POPULATED) - FetchContent_Populate(LZ4) - # Store the old value of the 'BUILD_SHARED_LIBS' - set (BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS}) - # Make subproject to use 'BUILD_SHARED_LIBS=OFF' setting. - set (BUILD_SHARED_LIBS OFF CACHE INTERNAL "Build SHARED libraries" FORCE) - # Store the old value of the 'BUILD_TESTING' - set (BUILD_TESTING_OLD ${BUILD_TESTING}) - # Make subproject to use 'BUILD_TESTING=OFF' setting. - set (BUILD_TESTING OFF CACHE INTERNAL "Build Unit Testing" FORCE) + # Store the old value of the 'BUILD_SHARED_LIBS' + set (BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS}) + # Make subproject to use 'BUILD_SHARED_LIBS=OFF' setting. + set (BUILD_SHARED_LIBS OFF CACHE INTERNAL "Build SHARED libraries" FORCE) + # Store the old value of the 'BUILD_TESTING' + set (BUILD_TESTING_OLD ${BUILD_TESTING}) + # Make subproject to use 'BUILD_TESTING=OFF' setting. + set (BUILD_TESTING OFF CACHE INTERNAL "Build Unit Testing" FORCE) - add_subdirectory(${lz4_SOURCE_DIR} ${lz4_BINARY_DIR}) + FetchContent_MakeAvailable(LZ4) - # Restore the old value of the parameter - set (BUILD_TESTING ${BUILD_TESTING_OLD} CACHE BOOL "Build Unit Testing" FORCE) - # Restore the old value of the parameter - set (BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD} CACHE BOOL "Type of libraries to build" FORCE) - endif () + # Restore the old value of the parameter + set (BUILD_TESTING ${BUILD_TESTING_OLD} CACHE BOOL "Build Unit Testing" FORCE) + # Restore the old value of the parameter + set (BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD} CACHE BOOL "Type of libraries to build" FORCE) # include (${BINARY_DIR}/LZ4-targets.cmake) set (LZ4_LIBRARY "lz4-static") diff --git a/LZ4/config/cmake/HDFPluginMacros.cmake b/LZ4/config/cmake/HDFPluginMacros.cmake index b33268e1..4e90e20d 100644 --- a/LZ4/config/cmake/HDFPluginMacros.cmake +++ b/LZ4/config/cmake/HDFPluginMacros.cmake @@ -150,10 +150,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -161,10 +161,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/LZ4/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/LZ4/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index d2fdb5dd..9dfe4cef 100644 --- a/LZ4/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/LZ4/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -97,10 +97,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -138,10 +138,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/LZF/config/CMakeLists.txt b/LZF/config/CMakeLists.txt index 7be2d295..6cd1fc78 100644 --- a/LZF/config/CMakeLists.txt +++ b/LZF/config/CMakeLists.txt @@ -100,10 +100,10 @@ endif () #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- -if (CMAKE_COMPILER_IS_GNUCC) +if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () -if (CMAKE_COMPILER_IS_GNUCXX) +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -111,10 +111,10 @@ endif () # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- -if (CMAKE_COMPILER_IS_GNUCC) +if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () -if (CMAKE_COMPILER_IS_GNUCXX) +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/LZF/config/cmake/H5LZFMacros.cmake b/LZF/config/cmake/H5LZFMacros.cmake index f8e79eac..0590bce8 100644 --- a/LZF/config/cmake/H5LZFMacros.cmake +++ b/LZF/config/cmake/H5LZFMacros.cmake @@ -17,39 +17,38 @@ macro (EXTERNAL_LZF_LIBRARY compress_type) FetchContent_Declare (LZF GIT_REPOSITORY ${LZF_URL} GIT_TAG ${LZF_BRANCH} + PATCH_COMMAND ${CMAKE_COMMAND} -E copy + ${H5LZF_SOURCE_DIR}/config/CMakeLists.txt + /CMakeLists.txt ) elseif (${compress_type} MATCHES "TGZ") FetchContent_Declare (LZF URL ${LZF_URL} URL_HASH "" + PATCH_COMMAND ${CMAKE_COMMAND} -E copy + ${H5LZF_SOURCE_DIR}/config/CMakeLists.txt + /CMakeLists.txt ) endif () - FetchContent_GetProperties (LZF) - if (NOT lzf_POPULATED) - FetchContent_Populate (LZF) - # Copy an additional/replacement files into the populated source - file(COPY ${H5LZF_SOURCE_DIR}/config/CMakeLists.txt DESTINATION ${lzf_SOURCE_DIR}) + set (LZF_EXTERNALLY_CONFIGURED OFF CACHE INTERNAL "No package" FORCE) + set (LZF_INSTALL_NO_DEVELOPMENT OFF CACHE INTERNAL "No package" FORCE) - set (LZF_EXTERNALLY_CONFIGURED OFF CACHE INTERNAL "No package" FORCE) - set (LZF_INSTALL_NO_DEVELOPMENT OFF CACHE INTERNAL "No package" FORCE) + # Store the old value of the 'BUILD_SHARED_LIBS' + set (BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS}) + # Make subproject to use 'BUILD_SHARED_LIBS=OFF' setting. + set (BUILD_SHARED_LIBS OFF CACHE INTERNAL "Build SHARED libraries" FORCE) + # Store the old value of the 'BUILD_TESTING' + set (BUILD_TESTING_OLD ${BUILD_TESTING}) + # Make subproject to use 'BUILD_TESTING=OFF' setting. + set (BUILD_TESTING OFF CACHE INTERNAL "Build Unit Testing" FORCE) - # Store the old value of the 'BUILD_SHARED_LIBS' - set (BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS}) - # Make subproject to use 'BUILD_SHARED_LIBS=OFF' setting. - set (BUILD_SHARED_LIBS OFF CACHE INTERNAL "Build SHARED libraries" FORCE) - # Store the old value of the 'BUILD_TESTING' - set (BUILD_TESTING_OLD ${BUILD_TESTING}) - # Make subproject to use 'BUILD_TESTING=OFF' setting. - set (BUILD_TESTING OFF CACHE INTERNAL "Build Unit Testing" FORCE) + FetchContent_MakeAvailable (LZF) - add_subdirectory (${lzf_SOURCE_DIR} ${lzf_BINARY_DIR}) - - # Restore the old value of the parameter - set (BUILD_TESTING ${BUILD_TESTING_OLD} CACHE BOOL "Build Unit Testing" FORCE) - # Restore the old value of the parameter - set (BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD} CACHE BOOL "Type of libraries to build" FORCE) - endif () + # Restore the old value of the parameter + set (BUILD_TESTING ${BUILD_TESTING_OLD} CACHE BOOL "Build Unit Testing" FORCE) + # Restore the old value of the parameter + set (BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD} CACHE BOOL "Type of libraries to build" FORCE) # include (${BINARY_DIR}/LZF-targets.cmake) set (LZF_LIBRARY "lzf-static") diff --git a/LZF/config/cmake/HDFPluginMacros.cmake b/LZF/config/cmake/HDFPluginMacros.cmake index b33268e1..4e90e20d 100644 --- a/LZF/config/cmake/HDFPluginMacros.cmake +++ b/LZF/config/cmake/HDFPluginMacros.cmake @@ -150,10 +150,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -161,10 +161,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/LZF/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/LZF/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index d2fdb5dd..9dfe4cef 100644 --- a/LZF/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/LZF/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -97,10 +97,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -138,10 +138,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/MAFISC/config/cmake/H5MAFISCMacros.cmake b/MAFISC/config/cmake/H5MAFISCMacros.cmake index 12a99b99..e34b6748 100644 --- a/MAFISC/config/cmake/H5MAFISCMacros.cmake +++ b/MAFISC/config/cmake/H5MAFISCMacros.cmake @@ -24,12 +24,7 @@ macro (EXTERNAL_MAFISC_LIBRARY compress_type) URL_HASH "" ) endif () - FetchContent_GetProperties (MAFISC) - if (NOT mafisc_POPULATED) - FetchContent_Populate (MAFISC) - - add_subdirectory (${mafisc_SOURCE_DIR} ${mafisc_BINARY_DIR}) - endif () + FetchContent_MakeAvailable (MAFISC) # include (${BINARY_DIR}/MAFISC-targets.cmake) set (MAFISC_LIBRARY "mafisc-static") diff --git a/MAFISC/config/cmake/HDFPluginMacros.cmake b/MAFISC/config/cmake/HDFPluginMacros.cmake index b33268e1..4e90e20d 100644 --- a/MAFISC/config/cmake/HDFPluginMacros.cmake +++ b/MAFISC/config/cmake/HDFPluginMacros.cmake @@ -150,10 +150,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -161,10 +161,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/MAFISC/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/MAFISC/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index d2fdb5dd..9dfe4cef 100644 --- a/MAFISC/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/MAFISC/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -97,10 +97,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -138,10 +138,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/SZ/config/cmake/H5SZMacros.cmake b/SZ/config/cmake/H5SZMacros.cmake index 3de93818..1c4c74a7 100644 --- a/SZ/config/cmake/H5SZMacros.cmake +++ b/SZ/config/cmake/H5SZMacros.cmake @@ -24,26 +24,22 @@ macro (EXTERNAL_SZ_LIBRARY compress_type) URL_HASH "" ) endif () - FetchContent_GetProperties (SZF) - if (NOT szf_POPULATED) - FetchContent_Populate (SZF) - # Store the old value of the 'BUILD_SHARED_LIBS' - set (BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS}) - # Make subproject to use 'BUILD_SHARED_LIBS=OFF' setting. - set (BUILD_SHARED_LIBS OFF CACHE INTERNAL "Build SHARED libraries") - # Store the old value of the 'BUILD_TESTING' - set (BUILD_TESTING_OLD ${BUILD_TESTING}) - # Make subproject to use 'BUILD_TESTING=OFF' setting. - set (BUILD_TESTING OFF CACHE INTERNAL "Build Unit Testing") + # Store the old value of the 'BUILD_SHARED_LIBS' + set (BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS}) + # Make subproject to use 'BUILD_SHARED_LIBS=OFF' setting. + set (BUILD_SHARED_LIBS OFF CACHE INTERNAL "Build SHARED libraries") + # Store the old value of the 'BUILD_TESTING' + set (BUILD_TESTING_OLD ${BUILD_TESTING}) + # Make subproject to use 'BUILD_TESTING=OFF' setting. + set (BUILD_TESTING OFF CACHE INTERNAL "Build Unit Testing") - add_subdirectory (${szf_SOURCE_DIR} ${szf_BINARY_DIR}) + FetchContent_MakeAvailable (SZF) - # Restore the old value of the parameter - set (BUILD_TESTING ${BUILD_TESTING_OLD} CACHE BOOL "Build Unit Testing" FORCE) - # Restore the old value of the parameter - set (BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD} CACHE BOOL "Type of libraries to build" FORCE) - endif () + # Restore the old value of the parameter + set (BUILD_TESTING ${BUILD_TESTING_OLD} CACHE BOOL "Build Unit Testing" FORCE) + # Restore the old value of the parameter + set (BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD} CACHE BOOL "Type of libraries to build" FORCE) # include (${BINARY_DIR}/SZ-targets.cmake) set (SZ_LIBRARY "SZ;zstd;ZLIB") diff --git a/SZ/config/cmake/HDFPluginMacros.cmake b/SZ/config/cmake/HDFPluginMacros.cmake index 40bf5cc1..2cad1318 100644 --- a/SZ/config/cmake/HDFPluginMacros.cmake +++ b/SZ/config/cmake/HDFPluginMacros.cmake @@ -150,10 +150,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -161,10 +161,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/SZ/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/SZ/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index d2fdb5dd..9dfe4cef 100644 --- a/SZ/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/SZ/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -97,10 +97,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -138,10 +138,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/ZFP/config/cmake/H5ZFPMacros.cmake b/ZFP/config/cmake/H5ZFPMacros.cmake index 9ff6ef9a..c554f4e9 100644 --- a/ZFP/config/cmake/H5ZFPMacros.cmake +++ b/ZFP/config/cmake/H5ZFPMacros.cmake @@ -20,36 +20,39 @@ macro (EXTERNAL_ZFP_LIBRARY compress_type) FetchContent_Declare (ZFP GIT_REPOSITORY ${ZFP_URL} GIT_TAG ${ZFP_BRANCH} + PATCH_COMMAND ${CMAKE_COMMAND} -E copy + ${H5ZFP_SOURCE_DIR}/config/CMakeLists.txt + /CMakeLists.txt + && ${CMAKE_COMMAND} -E copy + ${H5ZFP_SOURCE_DIR}/config/srcCMakeLists.txt + /src/CMakeLists.txt ) elseif (${compress_type} MATCHES "TGZ") FetchContent_Declare (ZFP URL ${ZFP_URL} URL_HASH "" + PATCH_COMMAND ${CMAKE_COMMAND} -E copy + ${H5ZFP_SOURCE_DIR}/config/CMakeLists.txt + /CMakeLists.txt + && ${CMAKE_COMMAND} -E copy + ${H5ZFP_SOURCE_DIR}/config/srcCMakeLists.txt + /src/CMakeLists.txt ) endif () - FetchContent_GetProperties (ZFP) - if (NOT zfp_POPULATED) - FetchContent_Populate (ZFP) - # Copy an additional/replacement files into the populated source - file(COPY ${H5ZFP_SOURCE_DIR}/config/CMakeLists.txt DESTINATION ${zfp_SOURCE_DIR}) - file(COPY ${H5ZFP_SOURCE_DIR}/config/srcCMakeLists.txt DESTINATION ${zfp_SOURCE_DIR}/src) - file(RENAME ${zfp_SOURCE_DIR}/src/srcCMakeLists.txt ${zfp_SOURCE_DIR}/src/CMakeLists.txt) + set (ZFP_WITH_OPENMP OFF CACHE BOOL "") + set (ZFP_BIT_STREAM_WORD_SIZE 8 CACHE STRING "") + set (ZFP_LIBRARY_PREFIX ${ZFP_LIBRARY_PREFIX} CACHE STRING "") - set (ZFP_WITH_OPENMP OFF CACHE BOOL "") - set (ZFP_BIT_STREAM_WORD_SIZE 8 CACHE STRING "") - set (ZFP_LIBRARY_PREFIX ${ZFP_LIBRARY_PREFIX} CACHE STRING "") + # Store the old value of the 'BUILD_SHARED_LIBS' + set (BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS}) + # Make subproject to use 'BUILD_SHARED_LIBS=OFF' setting. + set (BUILD_SHARED_LIBS OFF CACHE INTERNAL "Build SHARED libraries" FORCE) - # Store the old value of the 'BUILD_SHARED_LIBS' - set (BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS}) - # Make subproject to use 'BUILD_SHARED_LIBS=OFF' setting. - set (BUILD_SHARED_LIBS OFF CACHE INTERNAL "Build SHARED libraries" FORCE) + FetchContent_MakeAvailable (ZFP) - add_subdirectory (${zfp_SOURCE_DIR} ${zfp_BINARY_DIR}) - - # Restore the old value of the parameter - set (BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD} CACHE BOOL "Type of libraries to build" FORCE) - endif () + # Restore the old value of the parameter + set (BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD} CACHE BOOL "Type of libraries to build" FORCE) # include (${BINARY_DIR}/ZFP-targets.cmake) set (ZFP_LIBRARY "zfp") diff --git a/ZFP/config/cmake/HDFPluginMacros.cmake b/ZFP/config/cmake/HDFPluginMacros.cmake index b33268e1..4e90e20d 100644 --- a/ZFP/config/cmake/HDFPluginMacros.cmake +++ b/ZFP/config/cmake/HDFPluginMacros.cmake @@ -150,10 +150,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -161,10 +161,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/ZFP/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/ZFP/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index d2fdb5dd..9dfe4cef 100644 --- a/ZFP/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/ZFP/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -97,10 +97,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -138,10 +138,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/ZSTD/config/cmake/H5ZSTDMacros.cmake b/ZSTD/config/cmake/H5ZSTDMacros.cmake index 0fc22073..535678e1 100644 --- a/ZSTD/config/cmake/H5ZSTDMacros.cmake +++ b/ZSTD/config/cmake/H5ZSTDMacros.cmake @@ -17,38 +17,43 @@ macro (EXTERNAL_ZSTD_LIBRARY compress_type) FetchContent_Declare (ZSTD GIT_REPOSITORY ${ZSTD_URL} GIT_TAG ${ZSTD_BRANCH} + SOURCE_SUBDIR this-directory-does-not-exist + PATCH_COMMAND ${CMAKE_COMMAND} -E copy + ${H5ZSTD_SOURCE_DIR}/config/CMakeLists.txt + /build/cmake/CMakeLists.txt + ${H5ZSTD_SOURCE_DIR}/config/lib${CMAKE_COMMAND} -E copy + CMakeLists.txt + /build/cmake/lib/CMakeLists.txt ) elseif (${compress_type} MATCHES "TGZ") FetchContent_Declare (ZSTD URL ${ZSTD_URL} URL_HASH "" + SOURCE_SUBDIR build/cmake + PATCH_COMMAND ${CMAKE_COMMAND} -E copy + ${H5ZSTD_SOURCE_DIR}/config/CMakeLists.txt + /build/cmake/CMakeLists.txt + && ${CMAKE_COMMAND} -E copy + ${H5ZSTD_SOURCE_DIR}/config/libCMakeLists.txt + /build/cmake/lib/CMakeLists.txt ) endif () - FetchContent_GetProperties (ZSTD) - if (NOT zstd_POPULATED) - FetchContent_Populate (ZSTD) - # Copy an additional/replacement files into the populated source - file(COPY ${H5ZSTD_SOURCE_DIR}/config/CMakeLists.txt DESTINATION ${zstd_SOURCE_DIR}/build/cmake) - file(COPY ${H5ZSTD_SOURCE_DIR}/config/libCMakeLists.txt DESTINATION ${zstd_SOURCE_DIR}/build/cmake/lib) - file(RENAME ${zstd_SOURCE_DIR}/build/cmake/lib/libCMakeLists.txt ${zstd_SOURCE_DIR}/build/cmake/lib/CMakeLists.txt) + # Store the old value of the 'BUILD_SHARED_LIBS' + set (BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS}) + # Make subproject to use 'BUILD_SHARED_LIBS=OFF' setting. + set (BUILD_SHARED_LIBS OFF CACHE INTERNAL "Build SHARED libraries" FORCE) + # Store the old value of the 'BUILD_TESTING' + set (BUILD_TESTING_OLD ${BUILD_TESTING}) + # Make subproject to use 'BUILD_TESTING=OFF' setting. + set (BUILD_TESTING OFF CACHE INTERNAL "Build Unit Testing" FORCE) - # Store the old value of the 'BUILD_SHARED_LIBS' - set (BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS}) - # Make subproject to use 'BUILD_SHARED_LIBS=OFF' setting. - set (BUILD_SHARED_LIBS OFF CACHE INTERNAL "Build SHARED libraries" FORCE) - # Store the old value of the 'BUILD_TESTING' - set (BUILD_TESTING_OLD ${BUILD_TESTING}) - # Make subproject to use 'BUILD_TESTING=OFF' setting. - set (BUILD_TESTING OFF CACHE INTERNAL "Build Unit Testing" FORCE) + FetchContent_MakeAvailable (ZSTD) - add_subdirectory (${zstd_SOURCE_DIR}/build/cmake ${zstd_BINARY_DIR}) - - # Restore the old value of the parameter - set (BUILD_TESTING ${BUILD_TESTING_OLD} CACHE BOOL "Build Unit Testing" FORCE) - # Restore the old value of the parameter - set (BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD} CACHE BOOL "Type of libraries to build" FORCE) - endif () + # Restore the old value of the parameter + set (BUILD_TESTING ${BUILD_TESTING_OLD} CACHE BOOL "Build Unit Testing" FORCE) + # Restore the old value of the parameter + set (BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD} CACHE BOOL "Type of libraries to build" FORCE) # include (${BINARY_DIR}/ZSTD-targets.cmake) set (ZSTD_LIBRARY "libzstd_static") diff --git a/ZSTD/config/cmake/HDFPluginMacros.cmake b/ZSTD/config/cmake/HDFPluginMacros.cmake index 40bf5cc1..2cad1318 100644 --- a/ZSTD/config/cmake/HDFPluginMacros.cmake +++ b/ZSTD/config/cmake/HDFPluginMacros.cmake @@ -150,10 +150,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -161,10 +161,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/ZSTD/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/ZSTD/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index d2fdb5dd..9dfe4cef 100644 --- a/ZSTD/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/ZSTD/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -97,10 +97,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -138,10 +138,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/config/cmake/HDFPluginMacros.cmake b/config/cmake/HDFPluginMacros.cmake index b33268e1..4e90e20d 100644 --- a/config/cmake/HDFPluginMacros.cmake +++ b/config/cmake/HDFPluginMacros.cmake @@ -150,10 +150,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -161,10 +161,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/config/cmake/binex/config/cmake/HDFPluginMacros.cmake b/config/cmake/binex/config/cmake/HDFPluginMacros.cmake index d2fdb5dd..9dfe4cef 100644 --- a/config/cmake/binex/config/cmake/HDFPluginMacros.cmake +++ b/config/cmake/binex/config/cmake/HDFPluginMacros.cmake @@ -97,10 +97,10 @@ macro (BASIC_SETTINGS varname) #----------------------------------------------------------------------------- # Compiler specific flags : Shouldn't there be compiler tests for these #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS} -std=c99 -fomit-frame-pointer -finline-functions -fno-common") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_CXX_FLAGS} -fomit-frame-pointer -finline-functions -fno-common") endif () @@ -138,10 +138,10 @@ macro (BASIC_SETTINGS varname) # This is in here to help some of the GCC based IDES like Eclipse # and code blocks parse the compiler errors and warnings better. #----------------------------------------------------------------------------- - if (CMAKE_COMPILER_IS_GNUCC) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0") endif () - if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_COMPILER_IS_GNUCXX) + if (CMAKE_CXX_COMPILER_LOADED AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmessage-length=0") endif () diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake index 5e34fa20..027f78d5 100644 --- a/config/cmake/cacheinit.cmake +++ b/config/cmake/cacheinit.cmake @@ -78,7 +78,7 @@ set (BLOSC2_GIT_BRANCH "main" CACHE STRING "" FORCE) set (BLOSC2_TGZ_ORIGPATH "https://github.com/Blosc/c-blosc2/archive/refs/tags" CACHE STRING "Use PLUGINS from original location" FORCE) set (BLOSC2_TGZ_NAME "c-blosc2-2.14.4.tar.gz" CACHE STRING "Use BLOSC2 from compressed file" FORCE) -set (BLOSC2_PACKAGE_NAME "blosc" CACHE STRING "Name of BLOSC2 package" FORCE) +set (BLOSC2_PACKAGE_NAME "blosc2" CACHE STRING "Name of BLOSC2 package" FORCE) set (BLOSC2_ZLIB_GIT_URL "https://github.com/madler/zlib.git" CACHE STRING "Use ZLIB from GitHub repository" FORCE) set (BLOSC2_ZLIB_GIT_BRANCH "develop" CACHE STRING "" FORCE)