[CMake] Setting global default for a target property (DEBUG_POSTFIX)
James Turner
james.turner at kdab.com
Mon Oct 9 10:05:12 EDT 2017
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
More information about the CMake
mailing list