https://github.com/Kitware/CMake
Raw File
Tip revision: 18b02cc127730e3b007c2b56c6e115d476f0d5e0 authored by Brad King on 23 March 2022, 14:11:55 UTC
CMake 3.23.0-rc5
Tip revision: 18b02cc
CMP0004-policy-genex.cmake

cmake_minimum_required(VERSION 2.8.4)

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 >")
back to top