Skip to content

Commit d2195dd

Browse files
author
David Freese
committed
BLD: make test suite optional build
1 parent 5e26b4d commit d2195dd

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ build:
1414
script:
1515
- source set_gray_dir.sh
1616
- mkdir bin && mkdir build && cd build
17-
- cmake .. -DENABLE_ASAN=ON
17+
- cmake .. -DENABLE_TEST=ON -DENABLE_ASAN=ON
1818
- make
1919
- make test
2020
- cd ../materials

CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
1414
endif()
1515
endif()
1616

17+
option(ENABLE_TEST "Build the testing suite" OFF)
1718
option(ENABLE_LTO "Enable link-time optimization for the compilation" OFF)
1819
option(STATIC_BIN "Build fully staticially-linked binaries" OFF)
1920
option(ENABLE_ASAN "Build executables with address sanitizer enabled" OFF)
@@ -40,8 +41,10 @@ set(VERSION_PATCH 0)
4041

4142
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
4243

43-
enable_testing()
44-
4544
add_subdirectory(src)
46-
add_subdirectory(test)
45+
46+
if (ENABLE_TEST)
47+
enable_testing()
48+
add_subdirectory(test)
49+
endif (ENABLE_TEST)
4750

0 commit comments

Comments
 (0)