slint-ui / slint-ui/slint-cpp-template

A way to silence warnings (CMake)

Open
#21 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
CMake
Stars
76
Forks
19
PR merge metrics
No merged PRs in 30d

Description

I want to silence warnings from slint_generated_*.cpp files and files in _deps folder. To solve the problem, I did the following.

  1. Provide SYSTEM argument in FetchContent_Declare() to silence warnings from files in _deps folder.
  2. To silence warnings from generated file in CMakeLists.txt:
set_source_files_properties("slint_generated_ui_1.cpp" PROPERTIES COMPILE_OPTIONS "-w")

My compiler flags are declared in CMakePresets.json. Is there a better way to silence warnings?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with CMakeLists.txt, CMakePresets.json, and the FetchContent_Declare() calls mentioned in the issue. Review how slint_generated_*.cpp and files under _deps are compiled, then determine and document a supported way to silence only those warnings without affecting other sources.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.