Skip to content

fix build errors on Linux with Clang 20 and GTK warnings#12507

Merged
SoftFever merged 4 commits into
mainfrom
feature/fix_clang-error-on-linux
Mar 1, 2026
Merged

fix build errors on Linux with Clang 20 and GTK warnings#12507
SoftFever merged 4 commits into
mainfrom
feature/fix_clang-error-on-linux

Conversation

@SoftFever

@SoftFever SoftFever commented Feb 27, 2026

Copy link
Copy Markdown
Collaborator

Description

  1. guard -Wno-error=enum-constexpr-conversion behind compiler flag check
  2. Fix: Suppress GTK critical warnings and prevent multiple URI scheme registrations in WebView

Screenshots/Recordings/Graphs

Tests

Copilot AI review requested due to automatic review settings February 27, 2026 17:24

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

Updates the top-level CMake configuration to avoid a Clang 20 build failure by only adding -Wno-error=enum-constexpr-conversion when the active compiler actually supports that flag.

Changes:

  • Adds CheckCXXCompilerFlag usage to probe support for -Wno-error=enum-constexpr-conversion.
  • Applies -Wno-error=enum-constexpr-conversion only when the probe succeeds (for Clang/AppleClang > 15).
Comments suppressed due to low confidence (1)

CMakeLists.txt:440

  • For consistency with other uses of check_cxx_compiler_flag in this repo (and to avoid CMake list parsing edge-cases), pass the flag as a quoted string (e.g., "-Wno-error=...") rather than an unquoted argument.
        check_cxx_compiler_flag(-Wno-error=enum-constexpr-conversion HAS_WNO_ERROR_ENUM_CONSTEXPR_CONV)

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

@github-actions

Copy link
Copy Markdown

Test Results

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 4ae43f5. ± Comparison against base commit a2528fe.

@SoftFever SoftFever changed the title fix clang build error on Linux with Clang 20 fix build errors on Linux with Clang 20 and GTK warnings Mar 1, 2026
@SoftFever SoftFever merged commit b908bab into main Mar 1, 2026
5 of 10 checks passed
@SoftFever SoftFever deleted the feature/fix_clang-error-on-linux branch March 1, 2026 10:43
dbaarda pushed a commit to dbaarda/OrcaSlicer that referenced this pull request Mar 3, 2026
* upstream/main: (34 commits)
  Fix Bambu LAN printing with legacy network plugin (OrcaSlicer#12582)
  WIP: Parallelize macOS CI builds by splitting arm64 and x86_64 into separate jobs (OrcaSlicer#12562)
  VOLUMIC profils updates (OrcaSlicer#12565)
  Fix wiki redirection (OrcaSlicer#12569)
  Fix Celsius symbol not showing on G-code viewer (OrcaSlicer#12567)
  Revert "Revert "Set NSWindow color space to sRGB on macOS"" (OrcaSlicer#12546)
  Improve and complement the pt-BR translation (OrcaSlicer#12550)
  fix build errors on Linux with Clang 20 and GTK warnings (OrcaSlicer#12507)
  Fix "Glidlines" "gridlines locale (OrcaSlicer#12529)
  fix: typo "Glidlines" → "Gridlines" in View menu tooltip (OrcaSlicer#12527)
  Fix missing infill layers (fill_surface_by_multilines & fill_surface_trapezoidal bug fix) (OrcaSlicer#12516)
  fix missing translations for Canvas Toolbar Menu
  update profile version
  update locale
  Add option for hiding / showing gridlines (OrcaSlicer#10545)
  update locale and Simplified/Tranditional Chinese translation
  Enhancement: Enabling base patterns (infill) for Organic supports (OrcaSlicer#12141)
  I18n: Preview translations minor fix (Ukrainian) (OrcaSlicer#12504)
  update locale
  Fix: Init Serialized options (OrcaSlicer#12489)
  ...
Xipit pushed a commit to Xipit/OrcaSlicer that referenced this pull request Mar 16, 2026
…12507)

* guard -Wno-error=enum-constexpr-conversion behind compiler flag check

* Fix: Suppress GTK critical warnings and prevent multiple URI scheme registrations in WebView
davidjdixon pushed a commit to davidjdixon/OrcaSlicer that referenced this pull request Mar 21, 2026
…12507)

* guard -Wno-error=enum-constexpr-conversion behind compiler flag check

* Fix: Suppress GTK critical warnings and prevent multiple URI scheme registrations in WebView
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.

2 participants