From 1b94919c0669f325afd0348065f4baa52f1041ea Mon Sep 17 00:00:00 2001 From: Moritz Heinemann Date: Tue, 1 Aug 2023 00:31:54 +0200 Subject: [PATCH] Set CMAKE_BUILD_TYPE only for single-config generators --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6556144b..1ebda8b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ include(GNUInstallDirs) # --------------------------------------------------------------------------------------- # Set default build to release # --------------------------------------------------------------------------------------- -if(NOT CMAKE_BUILD_TYPE) +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose Release or Debug" FORCE) endif()