summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2022-08-17 16:18:24 (GMT)
committerGitHub <noreply@github.com>2022-08-17 16:18:24 (GMT)
commit7703990202cf226b132a5aac9020a33d6fc0405d (patch)
tree5099d756d45baa15900969274c18471c0c037b0b
parentf9b6967afaf5b89177ec8ee610723aa714dfb27e (diff)
downloadhdf5-7703990202cf226b132a5aac9020a33d6fc0405d.zip
hdf5-7703990202cf226b132a5aac9020a33d6fc0405d.tar.gz
hdf5-7703990202cf226b132a5aac9020a33d6fc0405d.tar.bz2
Correct target name for szaec lib - merge #2000 (#2002)
-rw-r--r--config/cmake/CTestCustom.cmake1
-rw-r--r--config/cmake/scripts/HDF5options.cmake12
-rw-r--r--config/cmake_ext_mod/HDFLibMacros.cmake8
-rw-r--r--config/sanitizer/code-coverage.cmake10
4 files changed, 16 insertions, 15 deletions
diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake
index 5beadce..6204d5c 100644
--- a/config/cmake/CTestCustom.cmake
+++ b/config/cmake/CTestCustom.cmake
@@ -25,6 +25,7 @@ set (CTEST_CUSTOM_WARNING_EXCEPTION
"H5Tconv.c[0-9 \t:]*warning:[ \t]*comparison is always false due to limited range of data type"
"H5Ztrans.c.[0-9]+.[ \t]*:[ \t]*warning C4244"
"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 09d877b..b14d07d 100644
--- 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 ####
@@ -98,8 +103,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()