cmake/Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake

15 lines
381 B
CMake
Raw Normal View History

2013-03-16 19:13:01 +02:00
2013-11-03 12:27:13 +02:00
cmake_minimum_required(VERSION 2.8.4)
2013-03-16 19:13:01 +02:00
cmake_policy(SET CMP0004 NEW)
add_library(foo SHARED empty.cpp)
add_library(bar SHARED empty.cpp)
add_library(bat SHARED empty.cpp)
# The negation here avoids the error.
target_link_libraries(foo "$<$<NOT:$<TARGET_POLICY:CMP0004>>: bar >")
# The below line causes the error.
target_link_libraries(foo "$<$<TARGET_POLICY:CMP0004>: bat >")