[cmake-developers] Race between ADD_CUSTOM_COMMAND()
Nils Gladitz
nilsgladitz at gmail.com
Wed Jul 4 13:19:57 EDT 2018
On 04.07.2018 18:52, Oleh Kravchenko wrote:
> Hello CMake Developers!
>
> Looks like I found interesting bug in CMake:
> - ADD_CUSTOM_TARGET() always creates Makefile rule for ADD_CUSTOM_COMMAND().
> - As result build simetimes failed if specified -jN for make.
FWIW this is documented behavior (so not exactly a bug):
https://cmake.org/cmake/help/latest/command/add_custom_command.html
"Do not list the output in more than one independent target that may
build in parallel or the two instances of the rule may conflict[...]".
Nils
More information about the cmake-developers
mailing list