Hello

I'd need to get the filepath of a created executable file, so that i can 
use the filepath on a custom command.

add_executable(Program ...)

add_custom_command(TARGET Program POST_BUILD COMMAND ${ProgramToRun} 
${Program} ...)

To clarify, i'd like to run the executable "ProgramToRun" with a command 
line argument that is a path to the executable created by add_executable.

the problem i'm facing is that with visual studio, the path is something 
like

<some_path>/build/Program/debug/Program.exe

or with release

<some_path>/build/Program/release/Program.exe

I have tried messing around with some variables such as:
- RUNTIME_OUTPUT_DIRECTORY
- BUILD_TYPE
Possibly others i can't remember, and undo wont show on my editor for some 
odd reason.

I think there has to be a way, since how would 

INSTALL(TARGETS Program)

know what files to copy.

i'd like to get my hands on that very information.

-mika
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to