CMake/Tests/RunCMake/VS10Project/VsCSharpCompilerOpts.cmake
Wil Stark 822697996e VS: Fix nowarn compiler option to accept warning numbers.
Warning disables are transferred to the VS IDE `<NoWarn>` node.

Fixes: #18878
2019-02-07 06:39:45 -05:00

15 lines
328 B
CMake

enable_language(CSharp)
add_library(foo SHARED
foo.cs)
set_target_properties(foo PROPERTIES
LINKER_LANGUAGE CSharp)
# Issue 18878
target_compile_options(foo PRIVATE "/platform:anycpu" "/nowarn:707,808" "/nowarn:909" )
# Debug only warning disable
set(CMAKE_CSharp_FLAGS_DEBUG "${CMAKE_CSharp_FLAGS_DEBUG} /nowarn:505")