[CMake] CMake adds -qalias=noansi by for XLC
Todd Gamblin
tgamblin at llnl.gov
Fri Jun 26 20:05:37 EDT 2015
Hi,
I noticed while poking around CMake's compiler modules that the defaults for
XL are kind of inconsistent. Specifically, If you look here:
https://github.com/Kitware/CMake/blob/master/Modules/Compiler/XL-C.cmake
CMake adds -qalias=noansi by default, which prevents a bunch of
optimizations. CMake does not add that for XL C++. It also doesn't tweak
any default aliasing settings for other compilers. Why XLC?
At LLNL, we don't like qalias=noansi because it prevents a lot of
optimizations, so we typically recommend that users NOT use that flag. It's
been surprising for us that CMake adds it by default when it's not a default
for XL, which uses -qalias=ansi (type-based aliasing) by default.
Is there some reason CMake adds it? Could it be removed in future versions
for consistency with the C++ settings? I can push a feature branch if
people agree that this is a good idea.
-Todd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150626/e61a4755/attachment.html>
More information about the CMake
mailing list