2
0
mirror of https://github.com/boostorg/gil.git synced 2026-02-23 03:42:09 +00:00

[cmake] Add workaround for clean MSVC warning level setting [ci skip]

This commit is contained in:
Mateusz Łoskot
2018-12-08 22:08:40 +01:00
parent b07501a8cc
commit 89f54ea203

View File

@@ -132,6 +132,11 @@ endif()
add_library(gil_compile_options INTERFACE)
target_compile_features(gil_compile_options INTERFACE cxx_std_11)
if(MSVC)
string(REGEX REPLACE "/W3" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
string(REGEX REPLACE "-W3" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
endif()
target_compile_options(gil_compile_options
INTERFACE
$<$<CXX_COMPILER_ID:MSVC>:-W4>