diff options
author | Wil Stark <wil_stark@keysight.com> | 2019-02-05 23:12:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-02-07 11:39:45 (GMT) |
commit | 822697996e3c3fb92eaa817584d0bf6e0bd76b22 (patch) | |
tree | e1689d83e5c97afb907cc12c820d1dd01b7a1761 /Tests/RunCMake/VS10Project/VsCSharpCompilerOpts.cmake | |
parent | 6f23321d405930241fa431cfda7650f2993f0c19 (diff) | |
download | CMake-822697996e3c3fb92eaa817584d0bf6e0bd76b22.zip CMake-822697996e3c3fb92eaa817584d0bf6e0bd76b22.tar.gz CMake-822697996e3c3fb92eaa817584d0bf6e0bd76b22.tar.bz2 |
VS: Fix nowarn compiler option to accept warning numbers.
Warning disables are transferred to the VS IDE `<NoWarn>` node.
Fixes: #18878
Diffstat (limited to 'Tests/RunCMake/VS10Project/VsCSharpCompilerOpts.cmake')
-rw-r--r-- | Tests/RunCMake/VS10Project/VsCSharpCompilerOpts.cmake | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/RunCMake/VS10Project/VsCSharpCompilerOpts.cmake b/Tests/RunCMake/VS10Project/VsCSharpCompilerOpts.cmake new file mode 100644 index 0000000..85af38b --- /dev/null +++ b/Tests/RunCMake/VS10Project/VsCSharpCompilerOpts.cmake @@ -0,0 +1,14 @@ +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") |