CMake编译报错:

CMake一直重复编译,停不下来,直到100次。提示为

CMake : manifest ‘build.ninja’ still dirty after 100 tries;
CMake Re_running

经查,原因为修改过系统时间后,修改了CMakeLists.txt或者是.cmake文件。

CMake在生成编译缓存时,回检测文件最后修改日期。

如果文件最后修改日期>编译启动时间,就会重新生成。

因此回一直卡在重复生成的步骤中。

解决方案

检查CMakeLists.txt或者是.cmake文件,有哪些是最后修改日期大于当前系统时间的,重新编辑以下,更新最后更改日期即可。

GitHub 加速计划 / ni / ninja
5
0
下载
a small build system with a focus on speed
最近提交(Master分支:5 天前 )
3844671f Fix MacOS github builds. 6 天前
ef65f36d MacOS builds are now failing at the "Install dependencies" step because Homebrew is now complaining that cmake is already installed on the system. It also warns about p7zip, so remove them both from the list of installed packages to resolve the problem. The macos.yml workflow file uses the macos-13 image that was updated recently. The latest succesful MacOS action on https://github.com/ninja-build/ninja [1] used release 20250818.1405, while the failing ones are using release 20250901.1455 [2]. From the corresponding image release pages, it seems that Homebrew was updated from 4.5.13 to 4.6.7 between the two, so assuming here this is why this started to happen. [1] https://github.com/ninja-build/ninja/actions/runs/17216151150/job/48840158004#step:1:15 [2] https://github.com/ninja-build/ninja/actions/runs/17460573439/job/49584121159#step:1:15 7 天前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐