You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
374 B

add_custom_target(target ALL)
set_target_properties(target PROPERTIES COMPILE_DEFINITIONS "touched" COMPILE_OPTIONS "${CMAKE_BINARY_DIR}/wdir")
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/wdir")
add_custom_command(
TARGET target
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E touch $<TARGET_PROPERTY:COMPILE_DEFINITIONS>
WORKING_DIRECTORY $<TARGET_PROPERTY:COMPILE_OPTIONS>
)