On 07/03/2015 10:48 PM, [email protected] wrote: > However, the Xcode Generator does not handle the -Ofast flag properly, > and then it is necessary to the set Optimization Level manually > when -Ofast flag is utilized in the project. > > This is because the Xcode Generator uses just one letter right after the `-O` > > to determine what the project setting should be. > When `-O3` is given, `3` is used for Optimization Level and everything is > fine, > but when `-Ofast` is given, `f` is used for it, which is an invalid value. > > It is not tested but it can be resolved by accepting all letter after `-O` > flags. > > Here is the relevant code handling Optimization Level: > https://github.com/Kitware/CMake/blob/3ae8e84ef5c94e5fa250b4e2466aa6632a233bb2/Source/cmGlobalXCodeGenerator.cxx#L2218 >
This is basically the same problem discussed here: Feature Request: Modify CXX_STANDARD behavior for Xcode Generator: Starting Tips http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/13557/focus=13572 The Xcode generator needs more complete flag->attribute mapping. Since we already have special handling for optimization flags one could extend it to cover the -Ofast case explicitly without introducing the full solution. -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
