Skip to content

Commit 8a2d7bb

Browse files
committed
Make HDF5 optional and skip tests when used as subproject
1 parent 53fc08b commit 8a2d7bb

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ add_subdirectory(src)
6464
# set(tld tld-dev)
6565
#add_subdirectory(dev)
6666

67-
include(CTest)
68-
69-
70-
71-
add_subdirectory(tests)
67+
# Only build tests when tld is the main project, not a subproject
68+
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
69+
include(CTest)
70+
add_subdirectory(tests)
71+
endif()
7272

7373

7474
# Package Generator #######################################################

0 commit comments

Comments
 (0)