Prevent Catch2 v2 tests running if loaded as a sub-project

See #2202
This commit is contained in:
Clare Macrae 2021-04-05 14:10:10 +01:00 committed by Martin Hořeňovský
parent 269f96e2bc
commit 1ff1f2741d
1 changed files with 2 additions and 0 deletions

View File

@ -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