summaryrefslogtreecommitdiffstats
path: root/c++
diff options
context:
space:
mode:
Diffstat (limited to 'c++')
-rw-r--r--c++/examples/CMakeLists.txt2
-rw-r--r--c++/test/CMakeLists.txt4
2 files changed, 4 insertions, 2 deletions
diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt
index 58d85c1..67d84a7 100644
--- a/c++/examples/CMakeLists.txt
+++ b/c++/examples/CMakeLists.txt
@@ -68,6 +68,6 @@ foreach (example ${tutr_examples})
set_target_properties (cpp_ex_${example} PROPERTIES FOLDER examples/cpp)
endforeach ()
-if (BUILD_TESTING)
+if (BUILD_TESTING AND HDF5_TEST_CPP AND HDF5_TEST_EXAMPLES)
include (CMakeTests.cmake)
endif ()
diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt
index 75efc3b..f6f5187 100644
--- a/c++/test/CMakeLists.txt
+++ b/c++/test/CMakeLists.txt
@@ -56,4 +56,6 @@ else ()
endif ()
set_target_properties (cpp_testhdf5 PROPERTIES FOLDER test/cpp)
-include (CMakeTests.cmake)
+if (HDF5_TEST_CPP)
+ include (CMakeTests.cmake)
+endif ()