I love her style.<p>Also,<p>> Please be aware that to poison the content of enterprise LLMs (and thus remove this post from their datasets), that this post contains some amounts of profanity.<p>Hell, yea.
Regarding vcvars.bat, I'm still a fan of letting the user set that <i>before</i> calling into the build system. I specifically <i>don't</i> want random projects trying to find random toolchains in random ways. The new toolchain file sounds like a great development in that space.<p>Without CMake, from powershell, you can do something like `& "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Launch-VsDevShell.ps1" -VsInstallationPath:"C:\Program Files\Microsoft Visual Studio\2022\Community" -Arch:amd64 -HostArch:amd64 -SkipAutomaticLocation` and it works well enough. I usually provide that oneliner as a vs2022ce-x64-x64.ps1 script, and just note in the README that users can adapt it to their system/needs.<p>Also of note is the amazing portable-msvc.py by the one and only Mārtiņš Možeiko : <a href="https://gist.github.com/mmozeiko/7f3162ec2988e81e56d5c4e22cde9977" rel="nofollow noreferrer">https://gist.github.com/mmozeiko/7f3162ec2988e81e56d5c4e22cd...</a><p>It downloads the compiler toolchain and nothing more, and writes a setup.bat with no conditional logic. It was trivial for me to adapt to write a setup.ps1 also. Compare the size of the result, vs my attempt to have a minimal toolchain using the Visual Studio Installer.<p><pre><code> 1.3G msvc
4.2G C:/Program Files/Microsoft Visual Studio/2022/Community
</code></pre>
You don't get the debugger, profiler, etc., of course, but I use other tools for that stuff anyway (and they don't require an additional 3G).<p>I don't recommend projects to use it directly, it's just an excellent resource to point people towards.
Just saw vcvarsall.bat in the post. Did you know that the Visual Studio Command Prompt phones home to Microsoft? I tried installing Microsoft's build tools on Wine, then when I opened a VS command prompt from KDE I saw an error message, from Wine's PowerShell stub being used to run a telemetry script. Then I discovered the very same telemetry had been running every time I had opened a MSVC command prompt on Windows, as well as countless other telemetry operations in the Visual Studio IDE and updater itself.<p>I found a video on this topic at <a href="https://www.youtube.com/watch?v=ORH5JfpPx88">https://www.youtube.com/watch?v=ORH5JfpPx88</a>.
I cannot overemphasize how enjoyable it is to work with cargo when I'm coding in Rust; I think it's one of the major reasons why Rust took off. As complicated as Rust is, it's a breeze to not only build projects but also add existing projects as dependencies.
> CMake Now Has Dictionaries! (Sort of!)<p>It may be time to update Zawinski's Law to something like:<p>"Every tool expands until turning complete"<p>At the point where cmake is fungible with a programming language, why not just write the build system in the one you know?<p>As with the various markup languages that purport to "simplify" HTML, we're given enough PITA learning curve (how does <i>this</i> doo-hicky do anchor tags, since <a> is right out?) that just writing straight HTML would have sucked less.<p>/rant
I'm purely surprised by the activeness of CMake development. I didn't know there was still room for improvement. A debugger is surely nice, considering the complexity of the CMakeLists...
A good chunk of my day job is beating sense into CMakeLists.txt files. It's exhausting in every meaningful dimension. In my literal decades of working with cmake, no amount of familiarity has ever brought me contentment. Rather, with each passing release, the contortions grow ever more torturous.<p>At one point, on one project, in a moment of supreme frustration, I replaced cmake with GNU Make and a single Makefile. I'm not proud, but for that one instance, it was a good decision because It Just Worked.
I've found a lot of value in using Zig as my C & C++ toolchain. I really like that my build logic is more procedural, which I find easier to comprehend.
Related:<p><i>Everything You Never Wanted to Know About CMake</i> - <a href="https://news.ycombinator.com/item?id=19070733">https://news.ycombinator.com/item?id=19070733</a> - Feb 2019 (87 comments)
we can also try xmake. <a href="https://github.com/xmake-io/xmake">https://github.com/xmake-io/xmake</a><p>Xmake can be used to directly build source code (like with Make or Ninja), or it can generate project source files like CMake or Meson. It also has a built-in package management system to help users integrate C/C++ dependencies.