summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-05-11 16:03:45 (GMT)
committerBrad King <brad.king@kitware.com>2020-05-11 16:03:45 (GMT)
commit9cd0523a33d22cee8af79d44d54cffdabe526bbc (patch)
tree6ecefc977d13ad453b4fdfec2a6b0dd80ae2caed /Tests
parent68f60c073f676b0cb343c3c0d98183a7ed3287a8 (diff)
parent6b2fb4ffd2e34093e54db0d5e2dac0fa17eacdf0 (diff)
downloadCMake-9cd0523a33d22cee8af79d44d54cffdabe526bbc.zip
CMake-9cd0523a33d22cee8af79d44d54cffdabe526bbc.tar.gz
CMake-9cd0523a33d22cee8af79d44d54cffdabe526bbc.tar.bz2
Merge branch 'vs-pch-compile-opts' into release-3.16
Merge-request: !4734
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/PrecompileHeaders/PchInterface.cmake3
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)