Skip to content

Commit b392e95

Browse files
author
Steven Noonan
committed
cmake: strip default /EHsc and /GR flags which we explicitly disable after
Otherwise we get a warning for every file we compile for the library. Signed-off-by: Steven Noonan <[email protected]>
1 parent b5db1d1 commit b392e95

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ option(Protobuf_USE_STATIC_LIBS "Build with a static Protobuf library" OFF)
3131
option(LIGHT_TESTS "Use smaller/shorter tests for simple integration testing (e.g. Travis)" OFF)
3232

3333
if (WIN32)
34+
#
35+
# Strip compiler flags which conflict with ones we explicitly set. If we don't
36+
# do this, then we get a warning on every file we compile for the library.
37+
#
38+
string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
39+
string(REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
40+
41+
#
42+
# Check whether BCrypt can be used with this SDK version
43+
#
3444
cmake_push_check_state()
3545
set(CMAKE_REQUIRED_LIBRARIES bcrypt)
3646
check_symbol_exists(BCryptEncrypt windows.h BCRYPT_AVAILABLE)

0 commit comments

Comments
 (0)