blond-org / BLonD-cpp

BLonD implementation in C++
GNU General Public License v3.0
2 stars 3 forks source link

Simplify makefile decomposing -Ofast into -O3 and -ffast-math #3

Closed kiliakis closed 8 years ago

kiliakis commented 8 years ago

The -Ofast flag is a gcc speciality. This will not be available with clang and therefore on osx. I propose to decompose the flag into "-O3 -ffast-math" which will transparently work on clang and gcc, all version supporting c++11. To know more about -Ofast, one can give a look to https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html

kiliakis commented 8 years ago

fixed

kiliakis commented 8 years ago

@OlegJakushkin I think that the new makefile you committed overwrote this one (it uses Ofast without checking if the compiler supports it). Please decompose it into -O3 -ffast-math.

I also get this warning when compiling:

At global scope: cc1plus: warning: unrecognized command line option "-Wno-rtti" [enabled by default]

Although the test check_cxx_compiler_flag(-Wno-rtti HAS_WNO_RTTI) , during the configuration, succeeds. Do you have any idea why?

OlegJakushkin commented 8 years ago

My bad - there is no -Wno-rtti only -fno-rtti

OlegJakushkin commented 8 years ago

Clang supports -Ofast from 3.8 http://stackoverflow.com/a/15548189/1973207 will I'll check for it in Cmake file.