diff options
author | Brad King <brad.king@kitware.com> | 2020-05-12 10:52:57 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-05-12 10:53:41 (GMT) |
commit | 44ae68d976ecd1ac721967a2fde241e24f2d7d12 (patch) | |
tree | fbde8baae44b3f8fc9ff1f8d41a9d8ef50269a89 /Tests | |
parent | 91dd23d3d544e25a88c8217b61d98a07ad73312c (diff) | |
parent | 6b2fb4ffd2e34093e54db0d5e2dac0fa17eacdf0 (diff) | |
download | CMake-44ae68d976ecd1ac721967a2fde241e24f2d7d12.zip CMake-44ae68d976ecd1ac721967a2fde241e24f2d7d12.tar.gz CMake-44ae68d976ecd1ac721967a2fde241e24f2d7d12.tar.bz2 |
Merge topic 'vs-pch-compile-opts' into release-3.17
6b2fb4ffd2 VS: Fix using PCH from source with COMPILE_OPTIONS
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4734
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/PrecompileHeaders/PchInterface.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Tests/RunCMake/PrecompileHeaders/PchInterface.cmake b/Tests/RunCMake/PrecompileHeaders/PchInterface.cmake index a1e0792..aab20d8 100644 --- a/Tests/RunCMake/PrecompileHeaders/PchInterface.cmake +++ b/Tests/RunCMake/PrecompileHeaders/PchInterface.cmake @@ -9,6 +9,9 @@ target_precompile_headers(foo PUBLIC <stdio.h> \"string.h\" ) +if(CMAKE_C_COMPILER_ID STREQUAL "MSVC") + set_property(SOURCE foo.c APPEND PROPERTY COMPILE_OPTIONS "-WX-") +endif() add_library(bar INTERFACE) target_include_directories(bar INTERFACE include) |