chili-epfl / chilitags

Robust Fiducial Markers for Augmented Reality And Robotics
http://chili.epfl.ch/software
123 stars 57 forks source link

-O3 #73

Closed ayberkozgur closed 9 years ago

ayberkozgur commented 9 years ago

Is there a reason why we are not compiling with -O3 right now?

qbonnard commented 9 years ago

Not that I know of. Doesn't it happen in the release build ? I remember having to actually disable it for emscripten to be happy. Does it improve anything ? Is it standard, or will it happen within some kind of if (gcc || clang) ?

Speciall offer today: ask one question, get 3 back ;)

ayberkozgur commented 9 years ago

Oh, cmake actually puts -O3 by itself in Release, I didn't know that :)

But, there is this issue: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=640214 So in the future, this might be subject to change. Disregard that, completely unrelated.

What is your opinion, should we force -O3 in the Release build ourselves?

qbonnard commented 9 years ago

No... in my opinion, we should start with existing problems before addressing the possible ones ;) In this spirit, I'd rather set the warning level to the maximum (e.g. -Wall, -Wpedantic, -Weffective etc), but I don't think CMakes knows how to do that indepedently from the compiler...

severin-lemaignan commented 9 years ago

It's not up to us to decide which flags to use, but to the package maintainer or the user. CMake provides reasonable default with Release, Debug, RelWithDebInfo.

Closing this issue.

ayberkozgur commented 9 years ago

The opposite makes more sense to me if you have good reasons. An example is OpenCV that has a long list of compile and link flags for Android (some even independent of the architecture) that are there by default. Admittedly, -O3 is not one of them and is left to the build type.