From 1ff1f2741d5e24686172d4681617ea6b89ea6654 Mon Sep 17 00:00:00 2001 From: Clare Macrae Date: Mon, 5 Apr 2021 14:10:10 +0100 Subject: [PATCH] Prevent Catch2 v2 tests running if loaded as a sub-project See #2202 --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 727aa186..2c6c8694 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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