Skip to content

Commit 7a2d59c

Browse files
committed
Disable testing when using BUILD_TESTING
1 parent 085a294 commit 7a2d59c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
2525
set(PYBIND11_MASTER_PROJECT ON)
2626
endif()
2727

28+
option(BUILD_TESTING "Build test suite?" ${PYBIND11_MASTER_PROJECT})
2829
option(PYBIND11_INSTALL "Install pybind11 header files?" ${PYBIND11_MASTER_PROJECT})
29-
option(PYBIND11_TEST "Build pybind11 test suite?" ${PYBIND11_MASTER_PROJECT})
30+
option(PYBIND11_TEST "Build pybind11 test suite?" ${BUILD_TESTING})
3031

3132
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/tools")
3233

0 commit comments

Comments
 (0)