Skip to content

Commit c7bfeb9

Browse files
committed
Add the BUILD_TESTS option to make building tests optional
This option is very helpful to downstream distributions
1 parent 966107f commit c7bfeb9

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ set(CMAKE_VERBOSE_MAKEFILE on)
1010
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/project-defaults.cmake)
1111

1212
add_subdirectory(yoga)
13-
add_subdirectory(tests)
13+
option(BUILD_TESTS "Build tests" ON)
14+
if(BUILD_TESTS)
15+
add_subdirectory(tests)
16+
endif()
1417

1518
option(BUILD_FUZZ_TESTS "Build fuzz tests" OFF)
1619

0 commit comments

Comments
 (0)