0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-27 07:31:03 +08:00

Safer regex replace, keeping options like "/Zc:twoPhase-" intact

This commit is contained in:
Alexander Straub 2019-09-04 19:41:34 +02:00
parent a084deb0b2
commit 2ec56d25b6

View File

@ -671,8 +671,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