Setting global default for a target property (DEBUG_POSTFIX)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Setting global default for a target property (DEBUG_POSTFIX)

James Turner-2
Hi,

Some of the windows developers for FlightGear would like to set a build-type suffix for executables, which they can do like this:

        set_target_properties( ourexetarget PROPERTIES DEBUG_POSTFIX d )

We already set the suffix for shared libraries with:

        set(CMAKE_DEBUG_POSTFIX          "d" CACHE STRING "add a postfix, usually d on windows”)


The problem is for executables, we seem to need to set the POSTFIX separately each time. Setting DEBUG_POSTFIX as a GLOBAL property doesn’t seem to work.

Is this possible, to set the default value for a target property? Or is there something special about executable targets for this?

Kind regards,
James Turner

--

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