-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split SSE cmake option. Use more descriptive names. #191
Split SSE cmake option. Use more descriptive names. #191
Conversation
Current FCL_HAVE_SSE is enabling march=native when compiled with gcc/clang. This flag enables much more than just SSE and it is specially dangerous when building packages. The current commit deprecate the option and change it by other two different ones: * FCL_USE_HOST_CUSTOM_CFLAGS (default off): same effect than then previous one, hopefully with a more decriptive name. * FCL_USE_X64_SSE (default on): enable the standard set of SEE flags supported in every x64 machine.
This looks good to me. I have two suggestions that might be useful:
Edit: Regarding the option name, |
if(FCL_USE_SSE) | ||
set(FCL_HAVE_SSE TRUE) | ||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") | ||
message(DEPRECATION "FCL_USE_SSE is deprecated please use: FCL_USE_X64_SSE or FCL_USE_HOST_CUSTOM_CFLAGS. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DEPRECATION
is not supported by CMake 2.8.12, which is the current minimum required CMake version of FCL. If I'm correct, FCL supports that version in order to support trusty.
In CMake 2.8.12, DEPRECATION
will not cause any problem, but the message will be printed as DEPRECATIONFCL_USE_SSE is deprecated ...
(no space after DEPRECATION). I would suggest we just use WARNING
instead or use DEPRECATION
only when it's supported.
My question might be a little too naive but is there a specific need justifying those cmake flags now ? Before using Eigen, the flag Now, all this is done by a combination of tools from the compiler and from Eigen. This automatic configuration is fine for most users. For advanced usage and/or optimization, one can always reconfigure via About the name of the flags, I suggest not to rename GCC options. Something like |
Looking into cmake code there seems to be more options than just Win32 for example itanium or x64. I found that the function implement values for
Added.
I prefer your suggestion or @jmirabel's (
That is a valid point. My personal view: if the machine has SSE support, go for it unconditionally. For the |
I have confirmed these changes work for MoveIt! on Ubuntu 16.04 / ROS Kinetic in this travis build: https://travis-ci.org/davetcoleman/moveit_kinetic_cpp11 |
|
Current
FCL_HAVE_SSE
is enabling-march=native
when compiled with gcc/clang. This flag enables much more than just SSE and it is specially dangerous when building packages.Debian users were the first detecting this problem. Note that the error appeared again the ROS community, which uses a custom version of the package.
The current commit deprecate the option and change it by other two different ones:
FCL_USE_HOST_CUSTOM_CFLAGS
(default off): same effect than then previous one, hopefully with a more decriptive name.FCL_USE_X64_SSE
(default on): enable the standard set of SEE flags supported in every x64 machine.
I have included the set of cflags that we use to build the gazebo amd64 debian package. So far I did not get any bug report about them.