From fb4ebb87e52aba4518662c855f266b96f08ea4ef Mon Sep 17 00:00:00 2001 From: AntoinePrv Date: Wed, 9 Aug 2023 15:59:13 +0200 Subject: [PATCH] Handle no CMAKE_BUILD_TYPE in LTO --- cmake/LinkTimeOptimization.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/LinkTimeOptimization.cmake b/cmake/LinkTimeOptimization.cmake index 2708cd7723..5a9d6ef916 100644 --- a/cmake/LinkTimeOptimization.cmake +++ b/cmake/LinkTimeOptimization.cmake @@ -24,7 +24,7 @@ function(mamba_should_lto) endif() # Check if we are building in a release-like build - string(TOLOWER ${CMAKE_BUILD_TYPE} build_type_lower) + string(TOLOWER "${CMAKE_BUILD_TYPE}" build_type_lower) set(valid_release_names "release" "relwithdebinfo") if(NOT ${build_type_lower} IN_LIST valid_release_names) set(${arg_RESULT} FALSE PARENT_SCOPE)