[CMake] $<TARGET_FILE:tgt> in the add_custom_command()
Kozlovskiy, Alexey
Alexey_Kozlovskiy at mentor.com
Tue Feb 14 06:38:02 EST 2012
Hi,
If the project name has a symbols "-" or "+" the $<TARGET_FILE:tgt> in the add_custom_command() return Error: "Error evaluating generator expression"
For example:
SET ( PROJECT_NAME "00010-Liquid+Gas_as_capture " )
set ( SRCS_MAIN_CPT main.c )
add_executable ( ${ PROJECT_NAME } ${SRCS_MAIN_CPT} )
add_custom_command ( TARGET ${ PROJECT_NAME } POST_BUILD
COMMAND "$<TARGET_FILE:${ PROJECT_NAME }>"
ARGS "$<TARGET_FILE_DIR:${ PROJECT_NAME }>/110.cnf"
COMMENT "Running cpt.exe..."
)
When I run the CMake I received the following error:
"CMake Error at problems.rt.Cmake:114 (add_custom_command):
Error evaluating generator expression:
$<TARGET_FILE:00010-Liquid+Gas_as_capture>
Expression syntax not recognized."
Is this a bug or some syntax limitation?
Regards,
Alexey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120214/4cc4236e/attachment.htm>
More information about the CMake
mailing list