Define a pre-build command without creating a new target

nope, it runs at build time. Try it! :wink:

personally I wouldn’t use configure_file twice, that’s very confusing. Try it in one go. You don’t need ConfigureDate.cmake.in. You can set time and paths directly without the need of execute_process or custom_command.