diff options
author | Brad King <brad.king@kitware.com> | 2022-05-20 13:12:49 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-05-20 13:12:57 (GMT) |
commit | 918e98e1313173b25dda662a447f9c0754990f31 (patch) | |
tree | 5ea9e1106bf20898ea5e53fd2df261a82240c9db /Tests | |
parent | 88ed9355f51d29d3aec9c6197217e7bf6c1c4bbb (diff) | |
parent | 7a2496daad2ed9d16c54ce7cb64694caaafc7f70 (diff) | |
download | CMake-918e98e1313173b25dda662a447f9c0754990f31.zip CMake-918e98e1313173b25dda662a447f9c0754990f31.tar.gz CMake-918e98e1313173b25dda662a447f9c0754990f31.tar.bz2 |
Merge topic 'vs-system-include'
7a2496daad VS: Add support for SYSTEM include directories
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7238
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/IncludeDirectories/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/Tests/IncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/CMakeLists.txt index 788c5be..bb4b92c 100644 --- a/Tests/IncludeDirectories/CMakeLists.txt +++ b/Tests/IncludeDirectories/CMakeLists.txt @@ -11,11 +11,11 @@ if (((CMAKE_C_COMPILER_ID STREQUAL GNU AND CMAKE_C_COMPILER_VERSION VERSION_GREA OR CMAKE_C_COMPILER_ID STREQUAL AppleClang OR CMAKE_C_COMPILER_ID STREQUAL LCC OR ("x${CMAKE_C_COMPILER_ID}" STREQUAL "xMSVC" AND - CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "19.29.30036.3" AND - NOT CMAKE_GENERATOR MATCHES "Visual Studio")) # No support for VS generators yet. + CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "19.29.30036.3")) AND (CMAKE_GENERATOR STREQUAL "Unix Makefiles" OR CMAKE_GENERATOR STREQUAL "Ninja" - OR (CMAKE_GENERATOR STREQUAL "Xcode" AND NOT XCODE_VERSION VERSION_LESS 6.0))) + OR (CMAKE_GENERATOR STREQUAL "Xcode" AND NOT XCODE_VERSION VERSION_LESS 6.0) + OR CMAKE_GENERATOR MATCHES "Visual Studio")) if ("x${CMAKE_C_COMPILER_ID}" STREQUAL "xMSVC") set(run_sys_includes_test 1) else () diff --git a/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt index a746a68..e4973b0 100644 --- a/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt +++ b/Tests/IncludeDirectories/SystemIncludeDirectories/CMakeLists.txt @@ -23,7 +23,8 @@ target_include_directories(upstream SYSTEM PUBLIC ) add_library(config_specific INTERFACE) -if(CMAKE_GENERATOR STREQUAL "Xcode") +get_property(isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(isMultiConfig) # CMAKE_BUILD_TYPE does not work here for multi-config generators target_include_directories(config_specific SYSTEM INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/config_specific" |