Fixes 50 Compiler Warnings: Add SYSTEM toCMakeLists.txt#10653
Fixes 50 Compiler Warnings: Add SYSTEM toCMakeLists.txt#10653SoftFever merged 5 commits intoOrcaSlicer:mainfrom
Conversation
There was a problem hiding this comment.
The ugly diff is a result of tr + sort + uniq of the lisbslic3r_sources listing. i.e. echo "..." | tr -d '[:blank:]' | sort | uniq
There was a problem hiding this comment.
The ugly diff is a result of tr + sort + uniq of the SLIC3R_GUI_SOURCES listing. i.e. echo "..." | tr -d '[:blank:]' | sort | uniq
ccd97eb to
4a497f2
Compare
08496d2 to
2ce9022
Compare
2ce9022 to
ced49dc
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR suppresses 49 third-party compiler warnings by adding the SYSTEM keyword to target_include_directories() calls in CMake files. It also fixes 1 actual compiler warning by removing an incorrect #pragma once directive from a .cpp file.
- Adds
SYSTEMkeyword to numerous CMake files to treat third-party headers as system headers - Removes
#pragma oncefrom a source file where it doesn't belong - Reorganizes source file listings in CMakeLists.txt files alphabetically
Reviewed Changes
Copilot reviewed 26 out of 28 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/slic3r/GUI/Widgets/ScrolledWindow.cpp | Removes incorrect #pragma once from source file |
| src/slic3r/CMakeLists.txt | Adds SYSTEM to third-party includes and reorganizes source list |
| src/libslic3r/CMakeLists.txt | Adds SYSTEM to OpenCASCADE includes and reorganizes source list |
| deps_src/*/CMakeLists.txt | Adds SYSTEM keyword to all third-party dependency include directories |
Comments suppressed due to low confidence (1)
src/slic3r/GUI/Widgets/ScrolledWindow.cpp:1
- The
#pragma oncedirective should not be used in source files (.cpp). It is only appropriate for header files (.hpp/.h) to prevent multiple inclusions during compilation.
// for scroll
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…es and SLIC3R_GUI_SOURCES"
ced49dc to
1d62bd6
Compare
SoftFever
left a comment
There was a problem hiding this comment.
Thank you!
Very nice fixes 👍
|
Thank you @SoftFever 😀 |
* main: Shellcheck everything (OrcaSlicer#10730) Update Anycubic Kobra 2 Neo machine profile fine tune end gcode (OrcaSlicer#10742) Update TURKISH translations (V2.3.1-beta) (OrcaSlicer#10726) Fixes 999 CMake Warnings (OrcaSlicer#10729) Fixes 50 Compiler Warnings: Add SYSTEM toCMakeLists.txt (OrcaSlicer#10653) Fix variable name comment and message (OrcaSlicer#10302) Reflect swapped mouse buttons in Help → Keyboard Shortcuts (OrcaSlicer#10647) [Profile]parameters modified in printer file (OrcaSlicer#10394)
* opt-marchsq: Shellcheck everything (OrcaSlicer#10730) Update Anycubic Kobra 2 Neo machine profile fine tune end gcode (OrcaSlicer#10742) Update TURKISH translations (V2.3.1-beta) (OrcaSlicer#10726) Fixes 999 CMake Warnings (OrcaSlicer#10729) Fixes 50 Compiler Warnings: Add SYSTEM toCMakeLists.txt (OrcaSlicer#10653) Fix variable name comment and message (OrcaSlicer#10302) Reflect swapped mouse buttons in Help → Keyboard Shortcuts (OrcaSlicer#10647) [Profile]parameters modified in printer file (OrcaSlicer#10394)
Description
This PR:
SYSTEMtotarget_include_directories()incmakefiles to reduce compiler warnings of 3rd party source that we cannot influenceExample:
vs.
Screenshots/Recordings/Graphs
Warnings as of
mainvs. PR: 172:122Warning distribution of
mainvs. PRvs.
Manually Tested