Packaging: Bad defaults for pixi CMAKE_BUILD_TYPE
- Dominant language
- C++
- Stars
- 33.6k
- Forks
- 6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 196
Description
### Problem description
Following up on #29356 (@sliptonic @Connor9220 @tarman3), it looks to me like `pixi run configure` initializes inconsistent and undesirable values for CMAKE_BUILD_TYPE. In detail:
pixi.toml
- `configure` task is an alias to the `configure-debug` task
- `configure-debug` task invokes `cmake --preset conda-linux-debug` or `conda-macos-debug` or `conda-windows-debug`
CMakePresets.json
- `conda-linux-debug` -> `conda-debug` -> `debug` -> `CMAKE_BUILD_TYPE=Debug` ❌
- `conda-macos-debug` -> `conda-debug` -> `debug` -> `CMAKE_BUILD_TYPE=Debug` ❌
- `conda-windows-debug` -> `conda-debug` but also overrides (I think? I don't have a windows setup to verify which one wins) `CMAKE_BUILD_TYPE=RelWithDebInfo` ✔️
Problem 1: I don't think the "debug" build type should change between operating systems
Problem 2: Many operations in FreeCAD are much slower in a `Debug` build than when running `Release` compiler optimizations, and I don't think that `Debug` should be our default configuration. I don't know if this was an intentional decision or not, but my understanding is that `RelWithDebInfo` exists for this exact use case -- it meets the needs of most people who want debug symbols without disabling important compiler optimizations. I think `configure` should default to `RelWithDebInfo` builds on all operating systems (over `Debug` at least; I wouldn't object to a default of `Release`), and perhaps we should have additional verbose flags to distinguish `configure-debug` from something like `configure-release-with-debug-info`. As far as I can tell, pixi doesn't offer any way to set up a `RelWithDebInfo` build, but it should, and it should probably also use that option as the default debug-ish configuration.
### Workbench affected?
None
### Steps to reproduce
On linux:
```
$ pixi run configure
$ cat build/debug/CMakeCache.txt | grep CMAKE_BUILD_TYPE
```
### Expected behavior
CMAKE_BUILD_TYPE:STRING=RelWithDebInfo
### Actual behavior
CMAKE_BUILD_TYPE:STRING=Debug
### Development version About Info (in Safe Mode)
```shell
Running off of today's main (4/17/2026):
OS: Arch Linux (wayland)
Architecture: x86_64
Version: 1.2.0dev.44915 (Git)
Build date: 2026/04/17 17:25:03
Build type: Release
Branch: main
Hash: 8e24fdc07ad23977c3f6fbf54ec1751a6515e0b3
Python 3.14.3, Qt 6.11.0, Coin 4.0.8, Vtk 9.5.2, boost 1_90, Eigen3 5.0.1, PySide 6.11.0
shiboken 6.11.0, SMESH 7.7.1.0, xerces-c 3.3.0, OCC 7.9.3
Locale: English/United States (en_US)
Stylesheet/Theme/QtStyle: unset/FreeCAD Classic/
Navigation Style/Orbit Style/Rotation Mode: CAD/Trackball/Drag at cursor
Logical DPI/Physical DPI/Pixel Ratio: 96/140.007/1
Installed mods:
* SheetMetal Workbench 0.7.55
```
### Last known good version (optional)
```shell
I don't know, I've always set up my build environments with cmake manually. Probably pixi has always had this issue.
```
Contributor guide
Research direction
Start with the configure and configure-debug tasks in pixi.toml, then trace the conda-* and debug preset inheritance in CMakePresets.json. Reproduce the Linux result with pixi run configure and inspect build/debug/CMakeCache.txt; done means the default configuration consistently reports CMAKE_BUILD_TYPE=RelWithDebInfo across the supported operating systems.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- Half a day
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100