Skip to content

Commit efe1b98

Browse files
committed
Properly exclude tests when BUILD_TESTING is OFF
1 parent 6ac10c3 commit efe1b98

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ add_subdirectory(lib)
115115
add_subdirectory(src)
116116

117117
# add unit tests
118-
add_subdirectory(tests)
118+
if(BUILD_TESTING)
119+
add_subdirectory(tests)
120+
endif()
119121

120122
# finally, generate export configs
121123
include(cmake/export.cmake)

0 commit comments

Comments
 (0)