Precompiled headers and unity build errors since 3.28.2
We encountered this with Blender since CMake 3.28.2.
Simple reproduction case: unity-pch.zip
make[2]: *** No rule to make target `CMakeFiles/test.dir/cmake_pch_arm64.hxx.pch', needed by `CMakeFiles/test.dir/Unity/unity_0_cxx.cxx.o'. Stop.
make[1]: *** [CMakeFiles/test.dir/all] Error 2
make: *** [all] Error 2
Likely caused by !9118 (merged). In particular it looks like AddUnityBuild
has been moved after AddPchDependencies
, which causes a missing dependency between unity build and pch files?