[CMake] add_executable created file name
Mika.Rajala at patria.fi
Mika.Rajala at patria.fi
Wed Dec 29 01:17:24 EST 2010
Thanks, this works nicely
Sorry for the double posting.
I waited for 30 minutes and the mail didn't appear on the list, so I
assumed it failed somehow.
-mika
Michael Wild <themiwi at gmail.com>
Sent by: cmake-bounces at cmake.org
28.12.2010 16:23
To
cmake at cmake.org
cc
Subject
Re: [CMake] add_executable created file name
On 12/28/2010 02:39 PM, Mika.Rajala at patria.fi wrote:
> 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
This has been addressed in
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f0cdb600, but that
hasn't made it into any official release yet. Until then, you can use
the CMAKE_CFG_INTDIR variable (refer to the docs for the details).
Michael
_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101229/b2232df7/attachment.htm>
More information about the CMake
mailing list