Skip to content

Commit

Permalink
Prevent Catch2 v2 tests running if loaded as a sub-project
Browse files Browse the repository at this point in the history
See #2202
  • Loading branch information
claremacrae authored and horenmar committed Apr 9, 2021
1 parent 269f96e commit 1ff1f27
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()

# Catch2's build breaks if done in-tree. You probably should not build
Expand Down

0 comments on commit 1ff1f27

Please sign in to comment.