summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/CMP0004/CMP0004-policy-genex.cmake
blob: eab680a92c61688e6a0ab3de570c29c93afd8dd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

cmake_minimum_required(VERSION 2.8)

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 >")