|
|
@@ -134,11 +134,15 @@ assert_property(newsignature1 LINK_LIBRARIES "depC;depB;subdirlib")
|
|
|
#----------------------------------------------------------------------------
|
|
|
# Test cross-directory linking.
|
|
|
cmake_policy(PUSH)
|
|
|
+cmake_policy(SET CMP0022 NEW)
|
|
|
cmake_policy(SET CMP0079 NEW)
|
|
|
add_executable(TopDir TopDir.c)
|
|
|
add_subdirectory(SubDirA)
|
|
|
add_subdirectory(SubDirB)
|
|
|
target_link_libraries(SubDirB TopDirImported)
|
|
|
+add_subdirectory(SubDirC)
|
|
|
+target_link_libraries(SubDirC PRIVATE SubDirC2)
|
|
|
+target_link_libraries(TopDir SubDirC)
|
|
|
add_library(TopDirImported IMPORTED INTERFACE)
|
|
|
target_compile_definitions(TopDirImported INTERFACE DEF_TopDirImported)
|
|
|
cmake_policy(POP)
|