You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
535 B
19 lines
535 B
cmake_policy(SET CMP0004 OLD)
|
|
|
|
add_library(foo SHARED empty.cpp)
|
|
add_library(bar SHARED empty.cpp)
|
|
add_library(bing SHARED empty.cpp)
|
|
add_library(bung SHARED empty.cpp)
|
|
|
|
cmake_policy(SET CMP0004 NEW)
|
|
|
|
add_library(bat SHARED empty.cpp)
|
|
|
|
target_link_libraries(foo "$<1: bar >")
|
|
target_link_libraries(bing "$<$<NOT:$<TARGET_POLICY:CMP0004>>: bar >")
|
|
target_link_libraries(bung "$<$<TARGET_POLICY:CMP0004>: bar >")
|
|
|
|
# The line below causes the error because the policy is NEW when bat
|
|
# is created.
|
|
target_link_libraries(bat "$<1: bar >")
|