Skip to content

Commit

Permalink
Prepare to prevent Catch2 v3's tests from being run, and CTest target…
Browse files Browse the repository at this point in the history
…s 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
  • Loading branch information
claremacrae authored Apr 16, 2021
1 parent 0416651 commit 2dc5a5f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ cmake_minimum_required(VERSION 3.5)
# disable testsuite in that case
if(NOT DEFINED PROJECT_NAME)
set(NOT_SUBPROJECT ON)
else()
set(NOT_SUBPROJECT OFF)
endif()

option(CATCH_INSTALL_DOCS "Install documentation alongside library" ON)
Expand Down

0 comments on commit 2dc5a5f

Please sign in to comment.