Skip to content

Commit 8b12ed8

Browse files
committed
Apply [CMAKE.SKIP_TESTS]
1 parent 96284ee commit 8b12ed8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

CMakeLists.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
cmake_minimum_required(VERSION 3.23)
77

8-
option(BUILD_TESTING "Build tests" ON)
9-
108
project(
119
beman.inplace_vector
1210
VERSION 1.0.0
@@ -15,6 +13,13 @@ project(
1513
LANGUAGES CXX
1614
)
1715

16+
# [CMAKE.SKIP_TESTS]
17+
option(
18+
BEMAN_INPLACE_VECTOR_BUILD_TESTS
19+
"Enable building tests and test infrastructure. Default: ON. Values: { ON, OFF }."
20+
${PROJECT_IS_TOP_LEVEL}
21+
)
22+
1823
include(GNUInstallDirs)
1924

2025
add_library(beman.inplace_vector INTERFACE)
@@ -42,7 +47,7 @@ install(
4247
"${CMAKE_CURRENT_SOURCE_DIR}/include/beman/inplace_vector/inplace_vector.hpp"
4348
)
4449

45-
if(BUILD_TESTING)
50+
if(BEMAN_INPLACE_VECTOR_BUILD_TESTS)
4651
include(CTest)
4752
add_subdirectory(tests/beman/inplace_vector)
4853
endif()

0 commit comments

Comments
 (0)