If I’m somewhat fed up with the complexities of CMake, what are the current hot alternatives? Assume a not huge C++ code base that needs to be buildable on Linux, Mac and Windows. A fair deal of external dependencies but otherwise pretty simple.
If I’m somewhat fed up with the complexities of CMake, what are the current hot alternatives? Assume a not huge C++ code base that needs to be buildable on Linux, Mac and Windows. A fair deal of external dependencies but otherwise pretty simple.
It's a weird that after 50+ years of C (and C++) development, the best system for building is CMake. It kind of does work, but it has so many rough edges, it's so hard to hold correctly and it's mostly totally crap.
Sure, there are some other systems that work better for happy cases but nothing that's common.
Maybe the C++ standard folks should fix this instead of all kinds of template wanking all the time? This is undoubtedly the biggest hurdle for C/C++ users.
So, I am a little confused how I'm supposed to find the compiled-for architecture in CMake on Windows with MSVC or the corresponding llvm/clang-cl distro, to detect e.g. ARM64 builds...
In theory, CMAKE_HOST_SYSTEM_PROCESSOR should stay at AMD64 (or whatever) while CMAKE_SYSTEM_PROCESSOR (the target/build platform, not the build host platform) should say something like ARM, right? That's how it works for manually-set-up cross compiling...
But, unless you manually change that (!), when you set up a build for ARM for the MSVC toolchain on the command line, or from Visual Studio, or with Visual Studio's built-in presets for ARM support thru CMake (via Open Folder), the only thing that tells you the real architecture is CMAKE_C_COMPILER_ARCHITECTURE_ID and friends. Which is ostensibly "internal".
Pretty frustrating. Feels wrong to use a supposedly-internal variable, but at least that one's documented, unlike the other mention of ARM in the CMakeCache.txt.
I cannot believe that the best practice for #CMake is to manually list every single C++ file in your entire project. It just seems insane.
I was tired of adding libraries to my #cmake build files in one of my #opensource projects. It was all very tedious. Now, I've switched to #vcpkg , even though I initially rejected it completely. It wasn't standards-compliant enough for me.
Now, everything compiles smoothly on Windows, Linux, and even on my Android tablet with #termux.
#Programming #cpp
🌖 Swift 與 Cute Framework:使用 CMake 建立專案
➤ 使用 CMake 輕鬆整合 Swift 與 Cute Framework 進行 2D 遊戲開發
✤ https://layer22.com/swift-and-cute-framework-setting-up-a-project-with-cmake
本文介紹如何使用 CMake 建立一個使用 Cute Framework 的 Swift 專案。Cute Framework 是一個用於 2D 遊戲開發的 C/C++ 框架,本文展示瞭如何利用 Swift 的安全性與表達能力編寫遊戲邏輯,同時利用 C/C++ 的效能進行渲染等關鍵任務。文章詳細說明瞭專案結構設定、CMakeLists.txt 檔案配置、Swift 互通性設定以及建構和執行專案的步驟,最終成功啟動一個包含旋轉女孩精靈的 Cute Framework 應用程式。
+ 教程寫得非常清楚,一步一步地引導你完成整個設定過程,對於想嘗試使用 Swift 進行遊戲開發的
#遊戲開發 #Swift #C++ #CMake #Cute Framework
🎮✨ So, you want to build a 2D game with a "Cute" framework using the latest, greatest, most expressive language known to mankind—Swift. 🤓 But wait, you'll need #CMake, because nothing says "modern" like cobbling together a project with a build system so arcane it might as well be ancient. 🙄 Enjoy your Frankenstein's monster of coding! 🧟♂️
https://layer22.com/swift-and-cute-framework-setting-up-a-project-with-cmake #2DGame #Development #Swift #CodingHumor #GameDev #HackerNews #ngated
An update is available for pythonbuilder, a core build system written and specified in Python.
https://codeberg.org/harald/pythonbuilder
- simplified API to generate a targets state and to create it
- build functions to support Java builds
Tutorial Example: https://codeberg.org/harald/pythonbuilder#example
#pythonbuilder
#buildmachine
#bashbuilder
#buildsystem
#softwaredevelopment
#programming
#python
#make
#gradle
#ant
#blt
#cmake
Why is ninja rebuilding my project every time???
Why it says that it has a dependency with a non-existing file called "/opt/rh/gcc-toolset-13/root/include/c++/13/cassert" ???
(I go down a rabbit hole)
Oh I see.
Thanks cmake⸮ 🙃
Just finished migrating the build for Compositor on Windows from Swift Package Manager to CMake (with some help from ChatGPT), consolidating the WinRT repos into a monorepo along the way. CMake looked a bit strange to me at first, but is actually great! #Swift #SwiftOnWindows #CMake https://github.com/ktraunmueller/Compositor/milestone/93?closed=1
CMake version on Ubuntu 24.04 less that CMake version on Ubuntu 22.04 #softwareinstallation #2404 #cmake
#TodayILearned that when building a #CMake project using #CMakePresets, it is absolutely essential to specify the `binaryDir`, as otherwise `cmake --build --preset <preset>` will err with the ambiguous error message:
"Error: is not a directory"
This is not very well explained by the documentation that simply states:
> cmake --build --preset <preset>
>
> --build <dir>
> Project binary directory to be built. This is required (unless a preset is specified) ...
Cf. https://cmake.org/cmake/help/latest/manual/cmake.1.html#build-a-project
Use #CMake they said,
It’d be much easier they said
Just give me an ice pick and I’ll do a lobotomy on myself, but don’t make me use CMake again 😫
The CLion 2025.2 Early Access Program Is Open
#Clang #CLion #Eap #News #Clionnova #Cmake #Googletest
Играем в старый мобильный Minecraft… на ПК без эмуляторов?
Добрый день, хабровчане! Сегодня речь пойдет о Minecraft PE — в основном для тех, кто хочет окунуться в ностальгию по старым версиям именно мобильного (карманного) издания. Способ поиграть на ПК весьма нетривиальный, зато удивит последующими возможностями игры и не использует эмуляцию.
https://habr.com/ru/articles/909646/
#minecraft #minecraft_pocket_edition #minecraft_pi_edition #visual_studio #cmake #python #игры
Today I learned, that it's pretty pointless to try to force #cmake to find Visual Studio 2010 (don't ask!), when the support for it has been removed with cmake 3.25 already.
https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2010%202010.html
Are there any examples of integration of "go test", cmake and out of source tree builds? It might come together eventually, but for now I feel cognitive dissonance and foresee a problem because I think both #GoLang and #CMake are very opinionated and want to be the top-level interface and to dictate the constraints to the whole system.