diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-08-17 16:17:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-17 16:17:58 (GMT) |
commit | f777350e82a0306141d3c6eb8adddc096b1c8ff1 (patch) | |
tree | ee29d824a148ad82095a3413b58d1f107007e112 /config | |
parent | 9c9f70ed695a0022a55bf53d085b7540ae5b5281 (diff) | |
download | hdf5-f777350e82a0306141d3c6eb8adddc096b1c8ff1.zip hdf5-f777350e82a0306141d3c6eb8adddc096b1c8ff1.tar.gz hdf5-f777350e82a0306141d3c6eb8adddc096b1c8ff1.tar.bz2 |
Correct target name for szaec lib - merge #2000 (#2003)
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake/CTestCustom.cmake | 1 | ||||
-rwxr-xr-x | config/cmake/scripts/HDF5options.cmake | 12 | ||||
-rw-r--r-- | config/cmake_ext_mod/HDFLibMacros.cmake | 8 | ||||
-rw-r--r-- | config/sanitizer/code-coverage.cmake | 10 |
4 files changed, 16 insertions, 15 deletions
diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake index b2edefc..53d815e 100644 --- a/config/cmake/CTestCustom.cmake +++ b/config/cmake/CTestCustom.cmake @@ -20,6 +20,7 @@ set (CTEST_CUSTOM_WARNING_EXCEPTION ${CTEST_CUSTOM_WARNING_EXCEPTION} "note.*expected.*void.*but argument is of type.*volatile" "plugin-build.*:[ \t]*warning" + "stamp.verify" "CMake Warning*stamp" "src.ZLIB.*:[ \t]*warning" "warning LNK4197:.*ZLIB-prefix" diff --git a/config/cmake/scripts/HDF5options.cmake b/config/cmake/scripts/HDF5options.cmake index 29a6560..6e78f40 100755 --- a/config/cmake/scripts/HDF5options.cmake +++ b/config/cmake/scripts/HDF5options.cmake @@ -21,10 +21,15 @@ #set (MAX_PROC_COUNT 8) ############################################################################################# -#### alternate toolsets #### +#### alternate toolsets (Windows usually) #### #set (CMAKE_GENERATOR_TOOLSET "Intel C++ Compiler 17.0") ############################################################################################# +### use a toolchain file (supported everywhere) #### + +#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/intel.cmake") + +############################################################################################# #### Only build static libraries #### #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF") #### Only build shared libraries #### @@ -101,8 +106,3 @@ endif() set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_PACKAGE_EXTLIBS:BOOL=ON") ############################################################################################# -### use a toolchain file - -#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/intel.cmake") - -############################################################################################# diff --git a/config/cmake_ext_mod/HDFLibMacros.cmake b/config/cmake_ext_mod/HDFLibMacros.cmake index d42b213..2c5a9bf 100644 --- a/config/cmake_ext_mod/HDFLibMacros.cmake +++ b/config/cmake_ext_mod/HDFLibMacros.cmake @@ -129,13 +129,13 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding) ##include (${BINARY_DIR}/${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake) # Create imported target szip-static if (USE_LIBAEC) - add_library(${HDF_PACKAGE_NAMESPACE}sz-static STATIC IMPORTED) - HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}sz-static "szaec" STATIC "") - add_dependencies (${HDF_PACKAGE_NAMESPACE}sz-static SZIP) + add_library(${HDF_PACKAGE_NAMESPACE}szaec-static STATIC IMPORTED) + HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}szaec-static "szaec" STATIC "") + add_dependencies (${HDF_PACKAGE_NAMESPACE}szaec-static SZIP) add_library(${HDF_PACKAGE_NAMESPACE}aec-static STATIC IMPORTED) HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}aec-static "aec" STATIC "") add_dependencies (${HDF_PACKAGE_NAMESPACE}aec-static SZIP) - set (SZIP_STATIC_LIBRARY "${HDF_PACKAGE_NAMESPACE}sz-static;${HDF_PACKAGE_NAMESPACE}aec-static") + set (SZIP_STATIC_LIBRARY "${HDF_PACKAGE_NAMESPACE}szaec-static;${HDF_PACKAGE_NAMESPACE}aec-static") else () add_library(${HDF_PACKAGE_NAMESPACE}szip-static STATIC IMPORTED) HDF_IMPORT_SET_LIB_OPTIONS (${HDF_PACKAGE_NAMESPACE}szip-static "szip" STATIC "") diff --git a/config/sanitizer/code-coverage.cmake b/config/sanitizer/code-coverage.cmake index e71bfd7..3a99024 100644 --- a/config/sanitizer/code-coverage.cmake +++ b/config/sanitizer/code-coverage.cmake @@ -214,7 +214,7 @@ function(target_code_coverage TARGET_NAME) # Add code coverage instrumentation to the target's linker command if(CMAKE_C_COMPILER_ID MATCHES "[Cc]lang" OR CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang") target_compile_options(${TARGET_NAME} PRIVATE -fprofile-instr-generate - -fcoverage-mapping) + -fcoverage-mapping --coverage) set_property( TARGET ${TARGET_NAME} APPEND_STRING @@ -225,7 +225,7 @@ function(target_code_coverage TARGET_NAME) PROPERTY LINK_FLAGS "-fcoverage-mapping ") elseif(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") target_compile_options(${TARGET_NAME} PRIVATE -fprofile-arcs - -ftest-coverage) + -ftest-coverage --coverage) target_link_libraries(${TARGET_NAME} PRIVATE gcov) endif() @@ -413,10 +413,10 @@ endfunction() # use `target_code_coverage`. function(add_code_coverage) if(CMAKE_C_COMPILER_ID MATCHES "[Cc]lang" OR CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang") - add_compile_options(-fprofile-instr-generate -fcoverage-mapping) - add_link_options(-fprofile-instr-generate -fcoverage-mapping) + add_compile_options(-fprofile-instr-generate -fcoverage-mapping --coverage) + add_link_options(-fprofile-instr-generate -fcoverage-mapping --coverage) elseif(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") - add_compile_options(-fprofile-arcs -ftest-coverage) + add_compile_options(-fprofile-arcs -ftest-coverage --coverage) link_libraries(gcov) endif() endfunction() |