summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GenEx-TARGET_PROPERTY/LinkImplementationCycle4.cmake
blob: 42290dedfd63b79c5cd92f9c1b58affab1f92a58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
enable_language(CXX)
add_library(empty1 empty.cpp)
add_library(empty2 empty.cpp)

# The INTERFACE_INCLUDE_DIRECTORIES do not depend on the link interface.
# On its own, this is fine. It is only when used by empty3 that an error
# is appropriately issued.
target_link_libraries(empty1
  INTERFACE
    $<$<STREQUAL:$<TARGET_PROPERTY:INTERFACE_INCLUDE_DIRECTORIES>,/foo/bar>:empty2>
)

add_library(empty3 empty.cpp)
target_link_libraries(empty3 empty1)

# Suppress generator-specific targets that might pollute the stderr.
set(CMAKE_SUPPRESS_REGENERATION TRUE)