Re: [CMake] Default CMAKE_C_FLAGS value by OS

2017-02-16 Thread Zan Lynx
On 02/16/2017 08:07 AM, Chuck Atkins wrote: > That being said, I do think we should revisit the use of O3 by default > given the safety issues surounding it. The following is just my opinion: In my experience if O3 fails it is a bug in the compiler, which should be fixed and somebody has to find

Re: [CMake] Default CMAKE_C_FLAGS value by OS

2017-02-16 Thread Alan W. Irwin
On 2017-02-16 10:07-0500 Chuck Atkins wrote: Hi YC, cmake version on fedora 25: 3.6.2 Fedora is specifically patching CMake in the RPM spec file to reduce the gcc flag from O3 to O2 so it's the distributuion's packaging making that change, not CMake itself. If you download and build the

Re: [CMake] Default CMAKE_C_FLAGS value by OS

2017-02-16 Thread ycollette . nospam
INFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}") string(REPLACE "${flag_orig}" "${flag_dest}" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") endmacro() Best regards, YC ----- Mail original ----- De: "Chuck Atkins" <chuck.atk...@kit

Re: [CMake] Default CMAKE_C_FLAGS value by OS

2017-02-16 Thread Chuck Atkins
Hi YC, > cmake version on fedora 25: 3.6.2 > Fedora is specifically patching CMake in the RPM spec file to reduce the gcc flag from O3 to O2 so it's the distributuion's packaging making that change, not CMake itself. If you download and build the source from cmake.org then you'll get O3 as

Re: [CMake] Default CMAKE_C_FLAGS value by OS

2017-02-16 Thread ycollette . nospam
uot;<CMAKE_${lang}_COMPILER> -S -o ") So, as you can see, on Fedora 25, there are no -O3 flags by default. YC - Mail original - De: "Dan Liew" <d...@su-root.co.uk> À: "ycollette nospam" <ycollette.nos...@free.fr> Cc: "cmake" <

Re: [CMake] Default CMAKE_C_FLAGS value by OS

2017-02-16 Thread Dan Liew
Hi, On 16 February 2017 at 09:06, wrote: > Hello, > > My question is related to CMAKE_*_FLAGS. > I've got a project under linux fedora 24 and, in release mode, this project > compiles with the -O2 flag. > But when I switched to other platform (ubuntu, fedora 16 - I

[CMake] Default CMAKE_C_FLAGS value by OS

2017-02-16 Thread ycollette . nospam
Hello, My question is related to CMAKE_*_FLAGS. I've got a project under linux fedora 24 and, in release mode, this project compiles with the -O2 flag. But when I switched to other platform (ubuntu, fedora 16 - I now this one is quite old but I need to compile on this platform), this default