Object library target failed to build in first run, because dependencies missing when using make -j4
In my CMakeLists.txt file, a couple of object library targets are defined to build, before building the final executable target. You can find the project with the CMakeLists.txt file at github.
The object libraries are used to model dependencies, however, if I build the project the first time, I get an error message:
No rule to make target 'CMakeFiles/assembler.dir/src/assembler.cpp.o', needed by 'cgra_assembler'. Stop.
Waiting for unfinished jobs...
If I compile with
make -j1, no error occurs, but if I use
make -j4, the mentioned error raises.
As an alternative, I tried ninja and no error occurs.
It seems, that something went wrong with the compile dependencies.