diff options
author | Da Quexian <daquexian566@gmail.com> | 2022-06-17 06:41:54 (GMT) |
---|---|---|
committer | Da Quexian <daquexian566@gmail.com> | 2022-06-17 14:38:07 (GMT) |
commit | 9680b3b2794b635b23fcbc072ed9ce9dac3c2333 (patch) | |
tree | a9167b522c25e67c1eff48ce2dca6fe21fd6dc59 /Tests/ExportImport | |
parent | 467d0e01f871fdbbc57b7403939bd50195b92631 (diff) | |
download | CMake-9680b3b2794b635b23fcbc072ed9ce9dac3c2333.zip CMake-9680b3b2794b635b23fcbc072ed9ce9dac3c2333.tar.gz CMake-9680b3b2794b635b23fcbc072ed9ce9dac3c2333.tar.bz2 |
Add EXPORT_NO_SYSTEM target property, deprecate IMPORTED_NO_SYSTEM
Issue: #18040
Signed-off-by: Da Quexian <daquexian566@gmail.com>
Diffstat (limited to 'Tests/ExportImport')
-rw-r--r-- | Tests/ExportImport/Export/CMakeLists.txt | 11 | ||||
-rw-r--r-- | Tests/ExportImport/Import/A/CMakeLists.txt | 14 |
2 files changed, 22 insertions, 3 deletions
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index c9e41f5..6f19c13 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -155,6 +155,15 @@ target_include_directories(testInterfaceIncludeUser "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/testInterfaceIncludeUser>" ) set_property(TARGET testInterfaceIncludeUser PROPERTY IMPORTED_NO_SYSTEM 1) + +add_library(testInterfaceIncludeUser2 INTERFACE) +target_include_directories(testInterfaceIncludeUser2 + INTERFACE + "$<INSTALL_INTERFACE:include/testInterfaceIncludeUser>" + "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/testInterfaceIncludeUser>" +) +set_property(TARGET testInterfaceIncludeUser2 PROPERTY EXPORT_NO_SYSTEM 1) + install( FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/testInterfaceIncludeUser/testInterfaceInclude.h" @@ -562,6 +571,7 @@ install( TopDirLib SubDirLinkA systemlib testInterfaceIncludeUser + testInterfaceIncludeUser2 EXPORT exp RUNTIME DESTINATION $<1:bin>$<0:/wrong> LIBRARY DESTINATION $<1:lib>$<0:/wrong> NAMELINK_SKIP @@ -622,6 +632,7 @@ export(TARGETS testExe1 testLib1 testLib2 testLib3 TopDirLib SubDirLinkA systemlib testInterfaceIncludeUser + testInterfaceIncludeUser2 NAMESPACE bld_ FILE ExportBuildTree.cmake ) diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt index 272c7a9..5bafdf8 100644 --- a/Tests/ExportImport/Import/A/CMakeLists.txt +++ b/Tests/ExportImport/Import/A/CMakeLists.txt @@ -75,6 +75,10 @@ add_library(imp_testInterfaceInclude1 STATIC imp_testInterfaceInclude1.c) target_include_directories(imp_testInterfaceInclude1 SYSTEM PRIVATE testInterfaceIncludeSystem) target_link_libraries(imp_testInterfaceInclude1 PRIVATE exp_testInterfaceIncludeUser) +add_library(imp_testInterfaceInclude1b STATIC imp_testInterfaceInclude1.c) +target_include_directories(imp_testInterfaceInclude1b SYSTEM PRIVATE testInterfaceIncludeSystem) +target_link_libraries(imp_testInterfaceInclude1b PRIVATE exp_testInterfaceIncludeUser2) + add_executable(imp_UseSharedLibWithHelper1 ../../../InterfaceLinkLibrariesDirect/UseSharedLibWithHelper.c) target_link_libraries(imp_UseSharedLibWithHelper1 PRIVATE exp_testSharedLibWithHelper testSharedLibHelperExclude) @@ -122,9 +126,13 @@ target_link_libraries(imp_testExe1b bld_testStaticLibWithPlugin ) -add_library(imp_testInterfaceInclude1b STATIC imp_testInterfaceInclude1.c) -target_include_directories(imp_testInterfaceInclude1b SYSTEM PRIVATE testInterfaceIncludeSystem) -target_link_libraries(imp_testInterfaceInclude1b PRIVATE bld_testInterfaceIncludeUser) +add_library(imp_testInterfaceInclude1c STATIC imp_testInterfaceInclude1.c) +target_include_directories(imp_testInterfaceInclude1c SYSTEM PRIVATE testInterfaceIncludeSystem) +target_link_libraries(imp_testInterfaceInclude1c PRIVATE bld_testInterfaceIncludeUser) + +add_library(imp_testInterfaceInclude1d STATIC imp_testInterfaceInclude1.c) +target_include_directories(imp_testInterfaceInclude1d SYSTEM PRIVATE testInterfaceIncludeSystem) +target_link_libraries(imp_testInterfaceInclude1d PRIVATE bld_testInterfaceIncludeUser2) add_custom_target(check_testLib1_genex ALL COMMAND ${CMAKE_COMMAND} -DtestLib1=$<TARGET_FILE:exp_testLib1> |