Skip to content

cmake: No additional compiler options by default#235

Merged
attipaci merged 1 commit into
mainfrom
cmake-defaults
Sep 6, 2025
Merged

cmake: No additional compiler options by default#235
attipaci merged 1 commit into
mainfrom
cmake-defaults

Conversation

@attipaci

@attipaci attipaci commented Sep 6, 2025

Copy link
Copy Markdown
Collaborator

CMake by default initializes CMAKE_BUILD_TYPE as an empty string. Previously we defaulted it to Release, which sets particular compiler options. However, in some cases we do not want to set extra compiler options. For example, Linux packagers typically want to control exactly what compiler options are used, which we should respect and not try to override. Thus, the default build type (empty string) is ideal for letting builders control exactly what compiler options should be used.

Hence let the default build type be left undefined, with no additional compiler flags other than what was set in the CFLAGS environment.

@attipaci attipaci added this to the 1.5.0 milestone Sep 6, 2025
@attipaci attipaci self-assigned this Sep 6, 2025
@attipaci attipaci added the enhancement New feature or request label Sep 6, 2025
@attipaci attipaci force-pushed the cmake-defaults branch 4 times, most recently from 4c63e9d to 09d5bb4 Compare September 6, 2025 15:46
@attipaci attipaci marked this pull request as ready for review September 6, 2025 16:08
@attipaci attipaci merged commit 7efe5ce into main Sep 6, 2025
13 checks passed
@attipaci attipaci deleted the cmake-defaults branch September 6, 2025 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant