GithubHelp home page GithubHelp logo

-WError abuse about cmake HOT 7 CLOSED

eyescale avatar eyescale commented on June 10, 2024
-WError abuse

from cmake.

Comments (7)

hernando avatar hernando commented on June 10, 2024

Some warnings, mostly related to optimizations, only occur in release builds. If we turn -Werror off in release builds chances are that they will go unnoticed for long time, for example until they cause a bug.

If I may ask, why is it such a big problem for you? I recently compiled most of your software with gcc 6.1 and there were only a couple or minor error, but no warning as fas as I can remember.

from cmake.

adevress avatar adevress commented on June 10, 2024

Warnings comes and go with compiler versions.

GCC 4.9.3 throws some warnings on some of your softwares for instance, even if your builds with GCC 5.2 does not.

Warnings can also pop up if you use a slightly different version of one dependency that has a change in its header.

Warnings are warnings, Error are errors and there is a reason for that. I am reduce to hack the build by enforcing XCODE_VERSION as a workaround to make this work, and this is a pity.

I maintain it is a bad practice to enable -WError by default. That's the guarantee that anyone packaging your software will run into troubles at each compiler upgrade. Nor Fedora nor Debian would accept a package that do that without patching it.

Please, if you do not want to disable it, at least provide a cmake option to disable this behavior... using XCODE_VERSION for that is very ugly.

from cmake.

eile avatar eile commented on June 10, 2024

We had magic to disable Werror on "released software" for this reason. The magic caused other issues, such as deformations of the lower limbs, which is why it was removed.

Imo we should have a COMMON_DISABLE_WERROR option.

Opinions?

from cmake.

eile avatar eile commented on June 10, 2024

@tribal-tec @rdumusc FYI

from cmake.

tribal-tec avatar tribal-tec commented on June 10, 2024

Support for different compilers other than the supported ones aka gcc 4.8 and 5.4 should be added then. Having a warning is one thing, but you might get real errors as well which have to be addressed similarly.

Warnings from out-of-our-control dependencies are a non-issue with -isystem, so I'm still wondering if it's crucial to have the option, because on a generalization one disables all warnings and hell breaks loose.

I'm not super-positive with adding the option, but it seems to be the shortest path to success.

from cmake.

adevress avatar adevress commented on June 10, 2024

Warnings from out-of-our-control dependencies are a non-issue with -isystem, so I'm still wondering if it's crucial to have the option, because on a generalization one disables all warnings and hell breaks loose.

-isystem unfortunatly does not solve all issues.

If you are using any component that do code generation and that your code generator is in a different version where you deploy your software, the build will explode to your face if you use -WError . That's the case for mod2c of neuron, bluron and coreneuron, ISPC of Brayns, protobuf, FLATBuffer, etc....

An option like COMMON_DISABLE_WERROR seems a good compromise to me

from cmake.

hernando avatar hernando commented on June 10, 2024

For code created by code generators a project may opt to use a specific set of compilation options for the generated source files.

I'm happy with the option as long as it's used only for packaging on unsupported platforms and assuming any derived problem is the packager responsibility.

from cmake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.