Skip to content

Commit ce3f809

Browse files
committed
fix options for MSVC
Change-Id: Icc56eb57cdae11061873c4db0b6e70097d4680a5
1 parent 737164b commit ce3f809

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ if(UNIX)
1919
endif(UNIX)
2020

2121
if(MSVC)
22-
set(CMAKE_CXX_FLAGS "/O2 /wd4251 /wd4273")
23-
set(CMAKE_CXX_FLAGS_RELEASE "/O2 /wd4251 /wd4273")
22+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /O2 /wd4251 /wd4273")
2423
add_definitions(/W3)
2524
endif(MSVC)
2625

@@ -56,7 +55,7 @@ if(APPLE)
5655
endif(APPLE)
5756

5857
if(MSVC)
59-
set(CMAKE_CXX_FLAGS "/EHa /Zi")
58+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHa /Zi")
6059
# https://cmake.org/cmake/help/latest/prop_tgt/MSVC_RUNTIME_LIBRARY.html
6160
# windows/restrictDriverAccess.cpp is building separately
6261
add_library(restrictDriverAccess OBJECT windows/restrictDriverAccess.cpp)

0 commit comments

Comments
 (0)