summaryrefslogtreecommitdiffstats
path: root/testpar/CMakeLists.txt
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2018-05-14 16:20:03 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2018-05-14 16:20:03 (GMT)
commitea66ac1e67bf2e5ccc59f30e6b648bb39c8f5e42 (patch)
treee71e1c6ffd6b6b4126ed232402beb5a80e5335d9 /testpar/CMakeLists.txt
parente6bc326ec0c417ef7b003da535b2e071442d2067 (diff)
parentdcc66a4f157ace0858b788228550f3e104df3242 (diff)
downloadhdf5-ea66ac1e67bf2e5ccc59f30e6b648bb39c8f5e42.zip
hdf5-ea66ac1e67bf2e5ccc59f30e6b648bb39c8f5e42.tar.gz
hdf5-ea66ac1e67bf2e5ccc59f30e6b648bb39c8f5e42.tar.bz2
Merging in latest from upstream (HDFFV/hdf5:refs/heads/develop)
* commit 'dcc66a4f157ace0858b788228550f3e104df3242': (35 commits) GGC requires attribute before function Correct COMPILE defs usage Add missing module_dir property Text cleanup Correct sentence punctuation. Add release note. Use set_property for MT flag Correct command usage Remove APPEND Fix typo Add missing test lib add missing folder to path Fix another command revert Missed a command revert Revert to old style for LINK_FLAGS gen expr not working LINK_FLAGS must be separate property sets Fix link flags syntax Revert refactor link flags refactor link flags to interface Refactor link flags ...
Diffstat (limited to 'testpar/CMakeLists.txt')
-rw-r--r--testpar/CMakeLists.txt31
1 files changed, 14 insertions, 17 deletions
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index 326c34f..e843811 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -2,11 +2,6 @@ cmake_minimum_required (VERSION 3.10)
project (HDF5_TEST_PAR C)
#-----------------------------------------------------------------------------
-# Apply Definitions to compiler in this directory and below
-#-----------------------------------------------------------------------------
-add_definitions (${HDF_EXTRA_C_FLAGS})
-
-#-----------------------------------------------------------------------------
# Define Tests
#-----------------------------------------------------------------------------
@@ -26,22 +21,24 @@ set (testphdf5_SOURCES
#-- Adding test for testhdf5
add_executable (testphdf5 ${testphdf5_SOURCES})
-set_property(TARGET testphdf5 APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
-TARGET_C_PROPERTIES (testphdf5 STATIC " " " ")
-target_link_libraries (testphdf5 PUBLIC ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
-if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND)
- target_link_libraries (testphdf5 PRIVATE ${MPI_C_LIBRARIES})
-endif ()
+target_include_directories(testphdf5
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+)
+TARGET_C_PROPERTIES (testphdf5 STATIC)
+target_link_libraries (testphdf5
+ PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>
+)
set_target_properties (testphdf5 PROPERTIES FOLDER test/par)
MACRO (ADD_H5P_EXE file)
add_executable (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c)
- set_property(TARGET ${file} APPEND PROPERTY INCLUDE_DIRECTORIES "${HDF5_SRC_DIR};${HDF5_BINARY_DIR}")
- TARGET_C_PROPERTIES (${file} STATIC " " " ")
- target_link_libraries (${file} PUBLIC ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
- if (HDF5_ENABLE_PARALLEL AND MPI_C_FOUND)
- target_link_libraries (${file} PRIVATE ${MPI_C_LIBRARIES})
- endif ()
+ target_include_directories(${file}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ )
+ TARGET_C_PROPERTIES (${file} STATIC)
+ target_link_libraries (${file}
+ PRIVATE ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_LIBRARIES}>
+ )
set_target_properties (${file} PROPERTIES FOLDER test/par)
ENDMACRO (ADD_H5P_EXE file)