
This uses `add_custom_command` to run a cmake script instead of using `configure_file` directly, which allows for adding dependencies and creates an ouput that can be depended on. It also uses `add_custom_command` instead of `add_custom_target` to create the M0 binary, since custom targets have no output file to depend on. Unfortunately, multiple targets cannot depend on the same generated file or cmake tries to run the generation multiple times in parallel. So, the .bin/.s generation is now duplicated for each target so they don't conflict. fixes #693
4 lines
40 B
CMake
4 lines
40 B
CMake
configure_file(
|
|
${SRC}
|
|
${DEST}
|
|
) |