Imported Upstream version 2.8.12.2
[platform/upstream/cmake.git] / Tests / RunCMake / CMP0004 / CMP0004-policy-genex.cmake
1
2 cmake_minimum_required(VERSION 2.8.4)
3
4 cmake_policy(SET CMP0004 NEW)
5
6 add_library(foo SHARED empty.cpp)
7 add_library(bar SHARED empty.cpp)
8 add_library(bat SHARED empty.cpp)
9
10 # The negation here avoids the error.
11 target_link_libraries(foo "$<$<NOT:$<TARGET_POLICY:CMP0004>>: bar >")
12
13 # The below line causes the error.
14 target_link_libraries(foo "$<$<TARGET_POLICY:CMP0004>: bat >")