Skip to content

Replace CMAKE_CXX_FLAGS with better option (warning config) #4

Open
@ricab

Description

@ricab

(issue corresponding to review suggestion here)

CMAKE_CXX_FLAGS is used to configure compiler warnings in cmake as part of the testing procedure, (following the this advice). I am not aware of a warning API in cmake and I know of no option that does not involve passing explicit flags to the compiler. So, AFAIU, better options to configure compiler warnings would still require explicit flags.

With that in mind, I see 2 contending alternatives to the current approach:

  • use target_compile_options on each target
  • use add_compile_options once

To be discussed. Suggestions of better options are welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions