The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=14899
======================================================================
Reported By: Kiron
Assigned To:
======================================================================
Project: CMake
Issue ID: 14899
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2014-04-28 08:22 EDT
Last Modified: 2014-04-28 08:22 EDT
======================================================================
Summary: $<TARGET_PROPERTY:prop> with add_custom_target does
not work
Description:
When using the $<TARGET_PROPERTY:FOO> generator expression inside an
add_custom_target command the following error is produced:
CMake Error at CMakeLists.txt:6 (add_custom_target):
Error evaluating generator expression:
$<TARGET_PROPERTY:FOO>
$<TARGET_PROPERTY:prop> may only be used with targets. It may not be used
with add_custom_command. Specify the target to read a property from using
the $<TARGET_PROPERTY:tgt,prop> signature instead.
I would expect that with add_custom_target command the short hand form should
work (like error message says already, ... may only be used with targets).
Steps to Reproduce:
Save this as a CMakeLists.txt and run cmake:
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project(Foo NONE)
add_custom_target(foo
COMMAND ${CMAKE_COMMAND} -E echo $<TARGET_PROPERTY:FOO>
)
set_property(TARGET foo PROPERTY FOO "foobar")
Additional Information:
Problem exists with cmake version 2.8.12.1, 3.0.20140422-g9f9532, and
3.0.20140424-gb4aa99
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-04-28 08:22 Kiron New Issue
======================================================================
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers