Skip to content

Remove pedantic compile flags (or offer a cmake option to remove them) #831

@bartgol

Description

@bartgol

Hello.

I'm using yaml-cpp as a submodule inside a project. This project has to compile also on gpu clusters, and that's where the pedantic flag hurts us: while parsing the files, nvcc includes some gcc line directives for gcc to consume; however, the pedantic flag causes gcc to complain, cause those lines are gcc-specific, and not standard:

error: style of line directive is a GCC extension

I know pedantic sounds like a good way to keep the code clean, but there are always legitimate exceptions, like this one.

I see two ways out: a) remove the pedantic flag altogether, and let the user add it if she/he wants it at config time; b) leave the flags in by default, but offer a cmake option, on by default, to disable them if the user doesn't want them.

Option a) is way easier to implement, while option b) would allow to keep the current behavior for all current builds.

I'm open to discussion, and also open to submit a PR if we agree on a solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions