Skip to content

A way to silence warnings (CMake) #21

Description

@metrapoliten

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions