From e29495373e1bd5458ca8283a3cdae9fc5e2d63ee Mon Sep 17 00:00:00 2001 From: std-any-emplace Date: Tue, 28 Jan 2020 21:28:34 +0100 Subject: [PATCH] Add an extra space after "/Z7". Else the flag gets joined with the flag following this and clang-cl does not like that. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 92546b7c..432bcffc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -763,8 +763,8 @@ if(MSVC) # Compile the static lib with debug information included # note: we assume here that the default flags contain some /Z flag - string(REGEX REPLACE "/Z.[^:]" "/Z7" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") - string(REGEX REPLACE "/Z.[^:]" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") + string(REGEX REPLACE "/Z.[^:]" "/Z7 " CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") + string(REGEX REPLACE "/Z.[^:]" "/Z7 " CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") # Optimization flags. # http://msdn.microsoft.com/en-us/magazine/cc301698.aspx