summaryrefslogtreecommitdiffstats
path: root/hl/c++
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-04-07 14:47:29 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-04-07 14:47:29 (GMT)
commit6108186feb0876c1ef3cd9cf09dca691fa609f87 (patch)
treed80c9fbbb2c1c3a476d0f076015af1538e3d5acf /hl/c++
parentd2b7bacea1d18526f1a21b344b07e1a8305f6bd6 (diff)
downloadhdf5-6108186feb0876c1ef3cd9cf09dca691fa609f87.zip
hdf5-6108186feb0876c1ef3cd9cf09dca691fa609f87.tar.gz
hdf5-6108186feb0876c1ef3cd9cf09dca691fa609f87.tar.bz2
TRILAB-192 - merge changes from develop
Single source, config files, for warnings for both autotools and CMake. Update CMake libraries, tools, tests to use correct flags.
Diffstat (limited to 'hl/c++')
-rw-r--r--hl/c++/src/CMakeLists.txt12
-rw-r--r--hl/c++/test/CMakeLists.txt1
2 files changed, 4 insertions, 9 deletions
diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt
index 01c8126..fbabc86 100644
--- a/hl/c++/src/CMakeLists.txt
+++ b/hl/c++/src/CMakeLists.txt
@@ -14,9 +14,7 @@ if (NOT ONLY_SHARED_LIBS)
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
- target_compile_options(${HDF5_HL_CPP_LIB_TARGET}
- PRIVATE "${HDF5_CMAKE_CXX_FLAGS}"
- )
+ target_compile_options(${HDF5_HL_CPP_LIB_TARGET} PRIVATE "${HDF5_CMAKE_CXX_FLAGS}")
TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIB_TARGET} STATIC)
target_link_libraries (${HDF5_HL_CPP_LIB_TARGET} PUBLIC ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIB_TARGET}")
@@ -31,12 +29,8 @@ if (BUILD_SHARED_LIBS)
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
- target_compile_options(${HDF5_HL_CPP_LIBSH_TARGET}
- PRIVATE "${HDF5_CMAKE_CXX_FLAGS}"
- )
- target_compile_definitions(${HDF5_HL_CPP_LIBSH_TARGET}
- PUBLIC "H5_BUILT_AS_DYNAMIC_LIB"
- )
+ target_compile_options(${HDF5_HL_CPP_LIBSH_TARGET} PRIVATE "${HDF5_CMAKE_CXX_FLAGS}")
+ target_compile_definitions(${HDF5_HL_CPP_LIBSH_TARGET} PUBLIC "H5_BUILT_AS_DYNAMIC_LIB")
TARGET_C_PROPERTIES (${HDF5_HL_CPP_LIBSH_TARGET} SHARED)
target_link_libraries (${HDF5_HL_CPP_LIBSH_TARGET} PUBLIC ${HDF5_HL_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_HL_CPP_LIBSH_TARGET}")
diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt
index 9bf32ef..5c224a8 100644
--- a/hl/c++/test/CMakeLists.txt
+++ b/hl/c++/test/CMakeLists.txt
@@ -2,6 +2,7 @@ cmake_minimum_required (VERSION 3.12)
project (HDF5_HL_CPP_TEST CXX)
add_executable (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp)
+target_compile_options(hl_ptableTest PRIVATE "${HDF5_CMAKE_CXX_FLAGS}")
target_include_directories (hl_ptableTest PRIVATE "${HDF5_HL_SRC_DIR}/test;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
if (NOT BUILD_SHARED_LIBS)
TARGET_C_PROPERTIES (hl_ptableTest STATIC)