summaryrefslogtreecommitdiffstats
path: root/c++
diff options
context:
space:
mode:
Diffstat (limited to 'c++')
-rw-r--r--c++/CMakeLists.txt2
-rw-r--r--c++/examples/CMakeTests.cmake16
-rw-r--r--c++/src/CMakeLists.txt2
-rw-r--r--c++/test/CMakeLists.txt10
-rw-r--r--c++/test/CMakeTests.cmake12
5 files changed, 21 insertions, 21 deletions
diff --git a/c++/CMakeLists.txt b/c++/CMakeLists.txt
index 9b560a6..06d4609 100644
--- a/c++/CMakeLists.txt
+++ b/c++/CMakeLists.txt
@@ -18,7 +18,7 @@ endif (BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
# Generate configure file
#-----------------------------------------------------------------------------
-CONFIGURE_FILE (${HDF5_RESOURCES_DIR}/H5cxx_config.h.in
+configure_file (${HDF5_RESOURCES_DIR}/H5cxx_config.h.in
${HDF5_BINARY_DIR}/H5cxx_pubconf.h
)
diff --git a/c++/examples/CMakeTests.cmake b/c++/examples/CMakeTests.cmake
index 5725f8e..352b799 100644
--- a/c++/examples/CMakeTests.cmake
+++ b/c++/examples/CMakeTests.cmake
@@ -5,7 +5,7 @@
##############################################################################
##############################################################################
# Remove any output file left over from previous test run
- ADD_TEST (
+ add_test (
NAME cpp_ex-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -16,14 +16,14 @@
Select.h5
)
if (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (cpp_ex-clear-objects PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (cpp_ex-clear-objects PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
set (last_test "cpp_ex-clear-objects")
foreach (example ${examples})
- ADD_TEST (NAME cpp_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
+ add_test (NAME cpp_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
if (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (cpp_ex_${example} PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (cpp_ex_${example} PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
set (last_test "cpp_ex_${example}")
endforeach (example ${examples})
@@ -31,7 +31,7 @@
# SET_TESTS_PROPERTIES(cpp_ex_readdata PROPERTIES DEPENDS cpp_ex_create)
# SET_TESTS_PROPERTIES(cpp_ex_chunks PROPERTIES DEPENDS cpp_ex_extend_ds)
- ADD_TEST (
+ add_test (
NAME cpp_ex_tutr-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -43,14 +43,14 @@
h5tutr_subset.h5
)
if (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (cpp_ex_tutr-clear-objects PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (cpp_ex_tutr-clear-objects PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
set (last_test "cpp_ex_tutr-clear-objects")
foreach (example ${tutr_examples})
- ADD_TEST (NAME cpp_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
+ add_test (NAME cpp_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
if (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (cpp_ex_${example} PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (cpp_ex_${example} PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
set (last_test "cpp_ex_${example}")
endforeach (example ${tutr_examples})
diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index 15eeacc..502a192 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -11,7 +11,7 @@ endif (BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
# Generate configure file
#-----------------------------------------------------------------------------
-CONFIGURE_FILE (${HDF5_RESOURCES_DIR}/H5cxx_config.h.in
+configure_file (${HDF5_RESOURCES_DIR}/H5cxx_config.h.in
${HDF5_BINARY_DIR}/H5cxx_pubconf.h
)
diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt
index 01a0179..ec2a32f 100644
--- a/c++/test/CMakeLists.txt
+++ b/c++/test/CMakeLists.txt
@@ -30,10 +30,7 @@ set (CPP_TEST_SRCS
# Generate the H5srcdir_str.h file containing user settings needed by compilation
#-----------------------------------------------------------------------------
set (srcdir ${CMAKE_CURRENT_SOURCE_DIR})
-CONFIGURE_FILE (${HDF5_CPP_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
-INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
-
-INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR} )
+configure_file (${HDF5_CPP_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY)
add_executable (cpp_testhdf5 ${CPP_TEST_SRCS} )
TARGET_NAMING (cpp_testhdf5 ${LIB_TYPE})
@@ -43,7 +40,10 @@ target_link_libraries (cpp_testhdf5
${HDF5_LIB_TARGET}
${HDF5_TEST_LIB_TARGET}
)
-set_target_properties (cpp_testhdf5 PROPERTIES FOLDER test/cpp)
+set_target_properties (cpp_testhdf5 PROPERTIES
+ FOLDER test/cpp
+ INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+)
add_custom_command (
TARGET cpp_testhdf5
diff --git a/c++/test/CMakeTests.cmake b/c++/test/CMakeTests.cmake
index ac1f111..2b05fea 100644
--- a/c++/test/CMakeTests.cmake
+++ b/c++/test/CMakeTests.cmake
@@ -5,7 +5,7 @@
##############################################################################
##############################################################################
# Remove any output file left over from previous test run
-ADD_TEST (
+add_test (
NAME cpp_testhdf5-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -17,8 +17,8 @@ ADD_TEST (
tfattrs.h5
)
-ADD_TEST (NAME cpp_testhdf5 COMMAND $<TARGET_FILE:cpp_testhdf5>)
-SET_TESTS_PROPERTIES (cpp_testhdf5 PROPERTIES DEPENDS cpp_testhdf5-clear-objects)
+add_test (NAME cpp_testhdf5 COMMAND $<TARGET_FILE:cpp_testhdf5>)
+set_tests_properties (cpp_testhdf5 PROPERTIES DEPENDS cpp_testhdf5-clear-objects)
if (HDF5_TEST_VFD)
@@ -37,7 +37,7 @@ if (HDF5_TEST_VFD)
MACRO (ADD_VFD_TEST vfdname resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
+ add_test (
NAME VFD-${vfdname}-cpp_testhdf5-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
@@ -48,7 +48,7 @@ if (HDF5_TEST_VFD)
tattr_scalar.h5
tfattrs.h5
)
- ADD_TEST (
+ add_test (
NAME VFD-${vfdname}-cpp_testhdf5
COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:cpp_testhdf5>"
@@ -59,7 +59,7 @@ if (HDF5_TEST_VFD)
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
)
- SET_TESTS_PROPERTIES (VFD-${vfdname}-cpp_testhdf5 PROPERTIES DEPENDS VFD-${vfdname}-cpp_testhdf5-clear-objects)
+ set_tests_properties (VFD-${vfdname}-cpp_testhdf5 PROPERTIES DEPENDS VFD-${vfdname}-cpp_testhdf5-clear-objects)
endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
ENDMACRO (ADD_VFD_TEST)