[CMake] how do I set the executable name for different build configurations?

Philip Lowman philip at yhbt.com
Tue May 13 07:24:44 EDT 2008


On Mon, May 12, 2008 at 8:48 PM, Phil Pellouchoud <Phil at slacker.com> wrote:

>  i.e.  I want my "debug" executable to be called "foo-debug.exe" and my
> "release" executable to be called"foo-release.exe"
>
You can use SET_TARGET_PROPERTIES with the <CONFIG>_OUTPUT_NAME property to
set it on a per configuration basis:
http://www.cmake.org/HTML/cmake-2.6.html#prop_tgt:OUTPUT_NAME


Alternatively if you're OK with just having a debug postfix (i.e. foo.exe &
foo-debug.exe) you can use the DEBUG_POSTFIX target property or
CMAKE_DEBUG_POSTFIX variable to affect all targets.

http://www.cmake.org/HTML/cmake-2.6.html#prop_tgt:DEBUG_POSTFIX
http://www.cmake.org/HTML/cmake-2.6.html#variable:CMAKE_DEBUG_POSTFIX

-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080513/91be3a09/attachment.htm>


More information about the CMake mailing list