My build system manually generates some files from others. It's using Visual Studio 2015 with CMake 3.11.4. It uses ADD_CUSTOM_TARGET
to invoke some internal scripts. Those scripts end up creating a file containing the timestamp when files where generated and this file is later used to only generate what needs to be.
I want this file containing the timestamp to be deleted when we clean the solution (In Visual Studio, "Build" -> "Clean solution"). I tried to add some CMake instruction:
SET_TARGET_PROPERTIES( MY_TARGET PROPERTIES ADDITIONAL_CLEAN_FILES "C:/dev/build/generated.timestamp" )
SET_PROPERTY( TARGET MY_TARGET APPEND PROPERTY ADDITIONAL_CLEAN_FILES "C:/dev/build/generated.timestamp" )
SET_PROPERTY( GLOBAL APPEND PROPERTY ADDITIONAL_CLEAN_FILES "C:/dev/build/generated.timestamp" )
SET_DIRECTORY_PROPERTIES( PROPERTIES ADDITIONAL_CLEAN_FILES "C:/dev/build/generated.timestamp" )
But none of them makes the file be deleted when I clean.
Is this doable and if so, what am I doing wrong?