slint-cpp-template icon indicating copy to clipboard operation
slint-cpp-template copied to clipboard

A way to silence warnings (CMake)

Open metrapoliten opened this issue 4 months ago • 0 comments

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?

metrapoliten avatar Jun 28 '25 02:06 metrapoliten