Merge pull request #2726 from TheMindVirus/master
Update CMakeLists.txt
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2d29062..c318eef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -198,7 +198,7 @@
if(ENABLE_EXCEPTIONS)
add_compile_options(/EHsc) # Enable Exceptions
else()
- string(REGEX REPLACE /EHsc "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Try to remove default /EHsc cxx_flag
+ string(REGEX REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # Try to remove default /EHsc cxx_flag
add_compile_options(/D_HAS_EXCEPTIONS=0)
endif()
endif()