From 371bc8ebe2d1b2f3996005717dfabdb6963855ad Mon Sep 17 00:00:00 2001 From: moritz-h <7849248+moritz-h@users.noreply.github.com> Date: Wed, 2 Aug 2023 16:22:20 +0200 Subject: [PATCH] Set CMAKE_BUILD_TYPE only for single-config generators (#2839) Thanks @moritz-h --- 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()