On 14.01.2015 13:11, Biddiscombe, John A. wrote:

file(WRITE “stuff containing above string”)

the file is written with "$<TARGET_FILE:hg_test_server>" inside it, and not the full path/name of the target as I’d hoped.

Is there a way to force the evaluation of the generator expression so it is correctly written out into the launch script?


file(WRITE) is run at configuration time. Generator expressions are evaluated after configuration has finished (at generation time). You can use file(GENERATE) to create files with generator expressions expanded at generation time.

Nils
-- 

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/mailman/listinfo/cmake

Reply via email to