Skip to content

build(cmake): stop defaulting to Debug builds#410

Merged
plexoos merged 1 commit into
mainfrom
refactor-cmake
Jul 10, 2026
Merged

build(cmake): stop defaulting to Debug builds#410
plexoos merged 1 commit into
mainfrom
refactor-cmake

Conversation

@plexoos

@plexoos plexoos commented Jul 10, 2026

Copy link
Copy Markdown
Member

Remove the top-level CMAKE_BUILD_TYPE fallback that forced single-config generators such as Ninja and Makefiles into Debug when users did not pass an explicit build type.

This lets CMake preserve its standard empty build-type behavior and requires callers to choose Debug, Release, RelWithDebInfo, or MinSizeRel intentionally.

Remove the top-level CMAKE_BUILD_TYPE fallback that forced single-config generators such as Ninja and Makefiles into Debug when users did not pass an explicit build type.

This lets CMake preserve its standard empty build-type behavior and requires callers to choose Debug, Release, RelWithDebInfo, or MinSizeRel intentionally.
Copilot AI review requested due to automatic review settings July 10, 2026 15:31
@plexoos plexoos self-assigned this Jul 10, 2026
@plexoos plexoos added the build Build-system or toolchain configuration problems label Jul 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the top-level CMAKE_BUILD_TYPE fallback that previously forced single-config generators (e.g., Ninja/Makefiles) into Debug when no build type was specified, restoring CMake’s standard “empty build type unless explicitly set” behavior.

Changes:

  • Deleted the root-level logic that set CMAKE_BUILD_TYPE=Debug when unset for single-config generators.
Comments suppressed due to low confidence (1)

CMakeLists.txt:15

  • This change makes single-config generators (Ninja/Makefiles) keep the default empty CMAKE_BUILD_TYPE unless the caller sets one. However, the repo's quick-start docs/examples still show configuring with cmake -S ... -B build without -DCMAKE_BUILD_TYPE=..., which now produces a different build than before (previously forced Debug). To match the PR description (“requires callers to choose … intentionally”) and avoid surprising builds, please update the build instructions (e.g., README + docs/getting-started + examples) to specify a recommended build type (Release/RelWithDebInfo) or explicitly document that leaving it unset is supported and what it implies.
project(simphony VERSION 0.7.0 LANGUAGES CXX CUDA)

# Use CMake's standard testing option, but avoid enabling this project's tests
# by default when Simphony is pulled in as a subproject.
if(NOT DEFINED BUILD_TESTING)
    set(BUILD_TESTING ${PROJECT_IS_TOP_LEVEL} CACHE BOOL "Build the testing tree.")
endif()

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@plexoos plexoos merged commit 78c9139 into main Jul 10, 2026
24 checks passed
@plexoos plexoos deleted the refactor-cmake branch July 10, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Build-system or toolchain configuration problems

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants