mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Prepare to prevent Catch2 v3's tests from being run, and CTest targets from being added, if Catch2 is configured as a sub-project. (#2205)
This commit fixes issue that happens if the project above us uses the same variable name, thus confusing our script which see the variable scoped from the project including Catch2, rather than ours See #2202
This commit is contained in:
parent
04166514fe
commit
2dc5a5f402
@ -4,6 +4,8 @@ cmake_minimum_required(VERSION 3.5)
|
|||||||
# disable testsuite in that case
|
# disable testsuite in that case
|
||||||
if(NOT DEFINED PROJECT_NAME)
|
if(NOT DEFINED PROJECT_NAME)
|
||||||
set(NOT_SUBPROJECT ON)
|
set(NOT_SUBPROJECT ON)
|
||||||
|
else()
|
||||||
|
set(NOT_SUBPROJECT OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(CATCH_INSTALL_DOCS "Install documentation alongside library" ON)
|
option(CATCH_INSTALL_DOCS "Install documentation alongside library" ON)
|
||||||
|
Loading…
Reference in New Issue
Block a user