Re: overriding CXX_FLAGS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 24 Jan, 2017 at 07:06:14 GMT, Mattia Verga wrote:
> In the latest version of RawTherapee, developers suggest the use of 
> -DCMAKE_CXX_FLAGS="-std=c++11".
>
> I've tried to modify the .spec file with 
> -DCMAKE_CXX_FLAGS="$RPM_OPT_FLAGS -std=c++11" [1], but koji still use 
> "-std=c++11 -std=gnu++11" [2] and the latter wins (I think).
>
> How can I override that setting?

Since it is a CMake package, it would be better to do:

    -DCMAKE_CXX_STANDARD=11
    -DCMAKE_CXX_STANDARD_REQUIRED=TRUE

This uses CMake's flag logic rather than hard-coding a flag.

There is also:

    -DCMAKE_CXX_EXTENSIONS=OFF

(on by default because compilers tend to default to using extensions) to
disable the GNU extensions.

It would be good for upstream to use these rather than manipulating
flags manually.

--Ben
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux