diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2021-06-02 23:22:35 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2021-06-17 18:02:52 (GMT) |
commit | 5a5c85dffd72972987cb542a4b6c9e606920cbb5 (patch) | |
tree | 1f975d56f02ebd08830687ec9326930c1d10339a /Tests/IncludeDirectories/SystemIncludeDirectoriesPerLang/CMakeLists.txt | |
parent | 399a3204bb2d198cc660cd83e0de39ad95658498 (diff) | |
download | CMake-5a5c85dffd72972987cb542a4b6c9e606920cbb5.zip CMake-5a5c85dffd72972987cb542a4b6c9e606920cbb5.tar.gz CMake-5a5c85dffd72972987cb542a4b6c9e606920cbb5.tar.bz2 |
Tests/IncludeDirectories: support MSVC in system include tests
Diffstat (limited to 'Tests/IncludeDirectories/SystemIncludeDirectoriesPerLang/CMakeLists.txt')
-rw-r--r-- | Tests/IncludeDirectories/SystemIncludeDirectoriesPerLang/CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Tests/IncludeDirectories/SystemIncludeDirectoriesPerLang/CMakeLists.txt b/Tests/IncludeDirectories/SystemIncludeDirectoriesPerLang/CMakeLists.txt index 70dfa01..5d58633 100644 --- a/Tests/IncludeDirectories/SystemIncludeDirectoriesPerLang/CMakeLists.txt +++ b/Tests/IncludeDirectories/SystemIncludeDirectoriesPerLang/CMakeLists.txt @@ -7,14 +7,14 @@ set_target_properties(c_interface PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "$<$<COMPILE_LANGUAGE:C>:${CMAKE_CURRENT_SOURCE_DIR}>" INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "$<$<COMPILE_LANGUAGE:C>:${CMAKE_CURRENT_SOURCE_DIR}>" ) -target_compile_options(c_interface INTERFACE "$<$<COMPILE_LANG_AND_ID:C,GNU,Clang>:-Werror=unused-variable>") +target_compile_options(c_interface INTERFACE "$<$<COMPILE_LANG_AND_ID:C,GNU,Clang>:-Werror=unused-variable>;$<$<COMPILE_LANG_AND_ID:C,MSVC>:/we4101>") add_library(cxx_interface INTERFACE) set_target_properties(cxx_interface PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/cxx_system_include>" INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_CURRENT_SOURCE_DIR}/cxx_system_include>" ) -target_compile_options(cxx_interface INTERFACE "$<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang>:-Werror=unused-variable>") +target_compile_options(cxx_interface INTERFACE "$<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang>:-Werror=unused-variable>;$<$<COMPILE_LANG_AND_ID:C,MSVC>:/we4101>") # The C header must come before the C++ header for this test to smoke out the # failure. The order of sources is how CMake determines the include cache |