From 822a1a86d1b504b54a8623b6899b3c23e9486a39 Mon Sep 17 00:00:00 2001 From: Shauren Date: Fri, 28 Aug 2020 15:13:10 +0200 Subject: [PATCH] Build: Prevent Catch from messing with user cmake preferences Closes #25348 --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ef7a576a7b..a7cb3a0f32 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,4 +98,10 @@ if(BUILD_TESTING) include(Catch) add_subdirectory(tests) + + # Catch cmakefile messes with our settings we explicitly leave up to the user + # restore user preference + if (NOT WITH_SOURCE_TREE STREQUAL "hierarchical-folders") + set_property(GLOBAL PROPERTY USE_FOLDERS OFF) + endif() endif()