Skip to content

Apply focused CMake build cleanup#1462

Merged
bmehta001 merged 3 commits into
microsoft:mainfrom
bmehta001:bhamehta/cmake-build-cleanup
Jun 5, 2026
Merged

Apply focused CMake build cleanup#1462
bmehta001 merged 3 commits into
microsoft:mainfrom
bmehta001:bhamehta/cmake-build-cleanup

Conversation

@bmehta001
Copy link
Copy Markdown
Contributor

This is split out of #1416 to keep the review surface small and focused.

Changes:

  • Remove unsafe -ffast-math usage from CMake release flags.
  • Keep CMake output/compatibility cleanup isolated from unrelated changes.
  • Align non-generated CPack package version metadata with the current 3.10 API version.
  • Preserve existing core SDK C++ standard behavior; this PR does not raise the required C++ standard.

Validation performed locally:

  • git diff --check
  • Windows CMake configure with CMAKE_POLICY_VERSION_MINIMUM=3.5

Split the broad code-cleanup PR into a smaller CMake-only review slice. Preserve the existing core SDK C++ standard behavior while removing unsafe fast-math flags, normalizing CMake status output, aligning package version metadata, and keeping zlib definitions compatible with older CMake.

Files changed: CMakeLists.txt, lib/CMakeLists.txt, tests/*/CMakeLists.txt, tools/Make*.cmake, tools/ParseOsRelease.cmake, zlib/CMakeLists.txt

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR tightens up the project’s CMake build configuration and packaging metadata, keeping changes focused on build hygiene and version alignment.

Changes:

  • Removes -ffast-math (and its related release-flag pairing) from release build flags to avoid unsafe floating-point optimizations.
  • Normalizes CMake logging and compatibility patterns (e.g., message(STATUS ...), quoting if(EXISTS ...), configure_file(... COPYONLY) for cross-version file copies).
  • Aligns CPack-driven package version metadata (DEB/RPM/TGZ) with the current 3.10 API version, without raising the required C++ standard.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
CMakeLists.txt Removes unsafe release flags, updates API version to 3.10, and standardizes configure-time status output.
lib/CMakeLists.txt CMake hygiene updates (quoted EXISTS, STATUS messages, and correct message(FATAL_ERROR ...) syntax).
tests/unittests/CMakeLists.txt Makes module/test source discovery more robust via quoting and consistent top-level source/binary dir variables.
tests/functests/CMakeLists.txt Same as unittests: improves module discovery paths, file copy compatibility, and logging consistency.
tools/ParseOsRelease.cmake Quotes EXISTS path and uses message(STATUS ...) for cleaner CMake output.
tools/MakeDeb.cmake Updates package minor version to 10 and standardizes packaging output logging.
tools/MakeRpm.cmake Updates package minor version to 10 and standardizes packaging output logging.
tools/MakeTgz.cmake Updates package minor version to 10 and standardizes packaging output logging.
zlib/CMakeLists.txt Adjusts Windows compile definitions handling within the zlib sub-build.

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

@bmehta001 bmehta001 requested a review from a team June 5, 2026 16:19
@bmehta001 bmehta001 merged commit f2502e6 into microsoft:main Jun 5, 2026
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants