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

View File

@ -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()
# Catch2's build breaks if done in-tree. You probably should not build # Catch2's build breaks if done in-tree. You probably should not build