Here is a common pattern in our code base:
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
set_target_properties(foobar PROPERTIES OUTPUT_NAME foobar64)
elseif (CMAKE_SIZEOF_VOID_P EQUAL 4)
set_target_properties(foobar PROPERTIES OUTPUT_NAME foobar32)
else()
message(FATAL_ERROR "Invalid")
endif()
It would be nice to have this instead:
set_target_properties(foobar PROPERTIES OUTPUT_NAME foobar${CMAKE_NUM_BITS})
I can present more cases for this variable if needed. Also the name is very changeable/subjective.
Thoughts?
- Juan