(build): errors when building using the "Unix Makefiles" generator and multiple processes.
Summary
I'm getting some build errors when building sight on linux using good ol' make and multiple processes.
This is related to the PCHs, I'm getting this error:
make[2]: *** No rule to make target 'pchCore/include/pchCore/pch.hpp.pch', needed by 'fwThread/CMakeFiles/fwThread.dir/src/fwThread/Pool.cpp.o'. Stop.
CMakeFiles/Makefile2:313: recipe for target 'fwThread/CMakeFiles/fwThread.dir/all' failed
make[1]: *** [fwThread/CMakeFiles/fwThread.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** No rule to make target 'pchCore/include/pchCore/pch.hpp.pch', needed by 'fwTools/CMakeFiles/fwTools.dir/src/fwTools/Bookmarks.cpp.o'. Stop.
CMakeFiles/Makefile2:368: recipe for target 'fwTools/CMakeFiles/fwTools.dir/all' failed
make[1]: *** [fwTools/CMakeFiles/fwTools.dir/all] Error 2
This does not happen when I disable PCHs or use a single build job (-j1
).
Steps to reproduce
- (You must be on linux)
- Create a build directory
cmake -G "Unix Makefiles" -DUSE_CONAN=TRUE -DCMAKE_BUILD_TYPE=Debug ../path/to/sight
make -j4
- try not to cry
- cry a lot
😭
Dev environment
- OS: Linux mint 18
- CMake version: 3.13.4
- Compiler: tested with clang-6.0 and gcc-7
- Build type: any
- Commit: latest dev