From 94668343c6638e03c0c787580ed5527cdc6a1b07 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 (cherry picked from commit 822a1a86d1b504b54a8623b6899b3c23e9486a39) --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5bb85d960d..957a2cc1fa 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()