Open mcandre opened 1 year ago
With some boilerplate, cmake is able to cleanup nearly every junk file.
Unfortunately, it flat refuses to delete the file .ninja_log
, even when this path is specified in ADDITIONAL_CLEAN_FILES
.
Unknown how cmake behaves when the MSVC junk file patterns are specified in ADDITIONAL_CLEAN_FILES
.
Using a rez clean
task to handle that.
Tried even more cmake workarounds.
Frankly, the cmake project is beyond busted. cmake's support for cleaning up file generation triggered by cmake, was never tested in comparison to classic make clean
behavior. When I tried to document the many quirks in cmake cleanup semantics, then their ticket system treated my updates as spam.
One workaround is to avoid ever using ninja with cmake. But that would slow down major C/C++ project builds.
May be worth identifying a suitable, highly portable replacement to cmake. Meson?
Relates to https://github.com/mcandre/toys/issues/429
See if clang-cl can load all of its silly vcvarsall.bat nonsense better than cl.
If so, consider deprecating rez in favor of nobuild.
https://learn.microsoft.com/en-us/cpp/build/clang-support-msbuild?view=msvc-170
https://github.com/tsoding/nobuild
Note that any compiler flags involved in compiling the nobuild build configuration source file, will have to be scripted by direnv / psenv.