#cmake

2025-06-18

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.

#cpp #c++ #cmake #buildsystems

2025-06-17

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.

#c++ #cpp #cmake #rubbish

Rylie Pavlik 🏳️‍⚧️rpavlik@hachyderm.io
2025-06-16

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.

#CMake #VisualStudio #MSVC

Akido37Akido37
2025-06-13

I cannot believe that the best practice for is to manually list every single C++ file in your entire project. It just seems insane.

Dirk Schnelle-Walkadsw@mastodontech.de
2025-06-11

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

cmake 超棒,有百分比 XD
#cmake #awesome

GripNewsGripNews
2025-06-07

🌖 Swift 與 Cute Framework:使用 CMake 建立專案
➤ 使用 CMake 輕鬆整合 Swift 與 Cute Framework 進行 2D 遊戲開發
layer22.com/swift-and-cute-fra
本文介紹如何使用 CMake 建立一個使用 Cute Framework 的 Swift 專案。Cute Framework 是一個用於 2D 遊戲開發的 C/C++ 框架,本文展示瞭如何利用 Swift 的安全性與表達能力編寫遊戲邏輯,同時利用 C/C++ 的效能進行渲染等關鍵任務。文章詳細說明瞭專案結構設定、CMakeLists.txt 檔案配置、Swift 互通性設定以及建構和執行專案的步驟,最終成功啟動一個包含旋轉女孩精靈的 Cute Framework 應用程式。
+ 教程寫得非常清楚,一步一步地引導你完成整個設定過程,對於想嘗試使用 Swift 進行遊戲開發的
++ Framework

N-gated Hacker Newsngate
2025-06-06

🎮✨ 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 , 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! 🧟‍♂️
layer22.com/swift-and-cute-fra

2025-05-31

An update is available for pythonbuilder, a core build system written and specified in Python.

codeberg.org/harald/pythonbuil

- simplified API to generate a targets state and to create it
- build functions to support Java builds

Tutorial Example: codeberg.org/harald/pythonbuil

#pythonbuilder
#buildmachine
#bashbuilder
#buildsystem
#softwaredevelopment
#programming
#python
#make
#gradle
#ant
#blt
#cmake

🅴🆁🆄🅰 🇷🇺erua@hub.hubzilla.de
2025-05-30
До удивления мало людей знает о «Geometry Dash». Вещь древняя, но получила с год назад обновление до 2.2 версии. Игра выглядит неплохо, а во время работы видяху не грузит, процессор тоже не напрягает. Реально никак не нагружает, т.е. может работать почти на любом древнем компе.

Если играть не получается, нервы сдают или выбешивает, то всегда есть «Practice Mode», включаемый через ромбик зелёный (с возможностью удалять последние точки). На геймпаде, на клавиатуре, на мышке — пофигу, всё на одной кнопке.

Вообще, динамика у игры бодрая как и в старых видео-играх сродни Zool. Да разного типа и класса, но вот-вот ожидается платформер, как один из режимов, в новых версиях «Geometry Dash». Народ уже даже пощупал его через различные хаки-кряки.

Есть так же и open source реализация, которой требуются ресурсы от 2.2 или 2.1 версии «Geometry Dash», т.е. по графике абсолютно это тоже самое.
Поиграть в онлайне тоже можно, несколько разных вариантов встречалось, не в курсе каких версий, видимо С++код собранный как WASM, т.е. может быть сделанное как WebAssembly. Вариант с открытыми исходниками OpenGD как раз на плюсах и сборке через cmake как самой игры, так и движка. Очень может быть что онлайн варианты как раз и есть OpenGD, а не оригинальный «Geometry Dash».

#GeometryDash #OpenGD #cmake #c++ #games #gaming #lang_ru @Russia
Roger Ferrer Ibáñezrofirrim@mastodon.world
2025-05-28

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⸮ 🙃

#professional #cmake

Screenshot of a terminal showing that cmake has wrongly collapsed a path. 

It happens because one of the components of the collapsed path is a soft-link adding additional components. In this case the path "/opt/rh/gcc-toolset-13/root/lib" is a soft link to "usr/lib". The path that cmake is collapsing includes the original path, so the last component "lib" is actually "usr/lib". cmake does a pure syntactical collapsing the ".." directories, without checking whether they are soft links and computes the wrong path.
2025-05-27

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 github.com/ktraunmueller/Compo

2025-05-27

CMake version on Ubuntu 24.04 less that CMake version on Ubuntu 22.04 #softwareinstallation #2404 #cmake

askubuntu.com/q/1549482/612

Jesper Stemann Andersenstemann
2025-05-20

that when building a project using , 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. cmake.org/cmake/help/latest/ma

Nina 👩‍💻nmetzinger@kif.rocks
2025-05-16

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 😫

2025-05-15

Играем в старый мобильный Minecraft… на ПК без эмуляторов?

Добрый день, хабровчане! Сегодня речь пойдет о Minecraft PE — в основном для тех, кто хочет окунуться в ностальгию по старым версиям именно мобильного (карманного) издания. Способ поиграть на ПК весьма нетривиальный, зато удивит последующими возможностями игры и не использует эмуляцию.

habr.com/ru/articles/909646/

#minecraft #minecraft_pocket_edition #minecraft_pi_edition #visual_studio #cmake #python #игры

2025-05-14

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.
cmake.org/cmake/help/latest/ge

2025-05-09

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.

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst