Fixes warning D9025 with NMake

This commit is contained in:
Armin Novak 2015-02-23 16:48:07 +01:00
parent 1fd5508afd
commit 89d97e3f2b

View File

@ -219,6 +219,21 @@ if("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
endif()
if(MSVC)
# Remove previous warning definitions,
# NMake is otherwise complaining.
foreach (flags_var_to_scrub
CMAKE_C_FLAGS
CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_MINSIZEREL)
string (REGEX REPLACE "(^| )[/-]W[ ]*[1-9]" " "
"${flags_var_to_scrub}" "${${flags_var_to_scrub}}")
endforeach()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Gd")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3")