[CMake] Getting the source file list for an executable fails
Campbell Barton
ideasman42 at gmail.com
Thu Sep 15 20:59:37 EDT 2011
Hi, I would expect this would work from reading the docs but it gives
add_executable(mytarget ${SRC})
get_property(TESTPROP_A TARGET mytarget PROPERTY SOURCE)
get_target_property(TESTPROP_B mytarget SOURCE)
message(FATAL_ERROR "Testing ${TESTPROP_A}, ${TESTPROP_B}")
The output I get is:
Testing '', 'TESTPROP_B-NOTFOUND'
This is odd since properties "TYPE" and "LOCATION" are found
Obviously in this case ${SRC} is already available, but I'm just
trying to figure out why it fails.
tested on cmake 2.8.5
--
- Campbell
More information about the CMake
mailing list