[CMake] How to do that w/o LOCATION property of a target...

Alex Turbov i.zaufi at gmail.com
Sat Sep 5 02:22:17 EDT 2015


Hi,

in my project I have `add_executable()`. after that, in a current binary
dir I need to render a `*.cmake` script (via `configure_file()`) to be
running from `add_test()` (as `cmake -P`) which should start just the
compiled executable via `execute_process()` and capture its output (to be
processed by followed commands)...

the problem is: how to render an absolute path to the compiled executable
inside the generated `*.cmake` script ??
0) access to LOCATION target property is prohibited from CMakeLists.txt, so
I can't set it into a generated script
1) generator expressions don't work w/ `configure_file()`

any other idea?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150905/ae41f6ee/attachment.html>


More information about the CMake mailing list