Commit 69821d9e by Paul Fultz II Committed by GitHub

Disable testing when using BUILD_TESTING (#1682)

parent cf0a6459
...@@ -272,6 +272,13 @@ if(PYBIND11_INSTALL) ...@@ -272,6 +272,13 @@ if(PYBIND11_INSTALL)
endif() endif()
endif() endif()
if(PYBIND11_TEST OR (BUILD_TESTING AND PYBIND11_MASTER_PROJECT)) # BUILD_TESTING takes priority, but only if this is the master project
if(PYBIND11_MASTER_PROJECT AND DEFINED BUILD_TESTING)
if(BUILD_TESTING)
add_subdirectory(tests) add_subdirectory(tests)
endif()
else()
if(PYBIND11_TEST)
add_subdirectory(tests)
endif()
endif() endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment