I am using cmake 2.8.12.2. I have set CMAKE_DEBUG_POSTFIX
, and it is automatically used with the add_library
command. But it is not automatically used with add_executable
command. I have discovered that I can set the DEBUG_POSTFIX
target property to get a debug postfix into the executable name, but this requires using an additional command.
add_executable(${PROJECT_NAME} ${SOURCE_FILES})
set_target_properties(${PROJECT_NAME} PROPERTIES DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
Is the second command explicitly setting the DEBUG_POSTFIX
target property required or is there an easier way?