diff options
author | Brad King <brad.king@kitware.com> | 2021-10-14 16:40:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-10-14 17:15:48 (GMT) |
commit | 7df0541055167d556d866000f8da4b0e7f186b92 (patch) | |
tree | 20380eb5841fbb0c945901b131541652f17f6ef8 /Tests/IncludeDirectories | |
parent | 1c12694124aedc0f7cf5a98e635e27d4c338fce0 (diff) | |
download | CMake-7df0541055167d556d866000f8da4b0e7f186b92.zip CMake-7df0541055167d556d866000f8da4b0e7f186b92.tar.gz CMake-7df0541055167d556d866000f8da4b0e7f186b92.tar.bz2 |
Add property to mark IMPORTED targets as not SYSTEM
Add an `IMPORTED_NO_SYSTEM` target property to specify this. When
enabled, do not treat the `INTERFACE_INCLUDE_DIRECTORIES` of an imported
target as `SYSTEM` include directories.
This is similar to the existing `NO_SYSTEM_FROM_IMPORTED` property, but
works from the consumed target rather than the consumer.
Fixes: #17364
Diffstat (limited to 'Tests/IncludeDirectories')
-rw-r--r-- | Tests/IncludeDirectories/CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/IncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/CMakeLists.txt index 4c488e6..efbcb7e 100644 --- a/Tests/IncludeDirectories/CMakeLists.txt +++ b/Tests/IncludeDirectories/CMakeLists.txt @@ -115,6 +115,13 @@ add_library(ordertest ordertest.cpp) target_include_directories(ordertest SYSTEM PUBLIC SystemIncludeDirectories/systemlib) target_include_directories(ordertest PUBLIC SystemIncludeDirectories/userlib) +add_library(ordertest2 ordertest.cpp) +target_include_directories(ordertest2 SYSTEM PRIVATE SystemIncludeDirectories/systemlib) +target_link_libraries(ordertest2 PRIVATE ordertest2_userlib) +add_library(ordertest2_userlib INTERFACE IMPORTED) +target_include_directories(ordertest2_userlib INTERFACE SystemIncludeDirectories/userlib) +set_property(TARGET ordertest2_userlib PROPERTY IMPORTED_NO_SYSTEM 1) + add_subdirectory(StandardIncludeDirectories) add_subdirectory(TargetIncludeDirectories) |