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

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

Please keep messages on-topic and check the CMake FAQ at:

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
CMake Consulting:
CMake Training Courses:

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe: