summaryrefslogtreecommitdiffstats
path: root/hl/c++
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-04-05 15:50:08 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-04-05 15:50:08 (GMT)
commit57f5d00a43421e4d2847d55560e4015f28cf162f (patch)
treee4fd18aca4f73eeb3bc8ca4ca115150f2b91abd4 /hl/c++
parent7a41367a130a615f06e5c35154abbdc621c7c6b7 (diff)
downloadhdf5-57f5d00a43421e4d2847d55560e4015f28cf162f.zip
hdf5-57f5d00a43421e4d2847d55560e4015f28cf162f.tar.gz
hdf5-57f5d00a43421e4d2847d55560e4015f28cf162f.tar.bz2
TRILAB-192 add c++ and fortran warnings build systems one file
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)