On 07/12/2010 01:12 PM, Verweij, Arjen wrote: > As a follow-up: redefining CMAKE_Fortran_LINK_EXECUTABLE to not include > <FLAGS> gets rid of the CMAKE_Fortran_FLAGS.. but perhaps other (useful) > stuff as well? As a sidetrack I’m starting to wonder what the purpose of > CMAKE_<LANG>_FLAGS is. The book lists it as cmake’s counterpart of the > environment variable, e.g. CMAKE_CXX_FLAGS and CXXFLAGS from the shell, > which means it doesn’t make sense to include it when linking. Am I > overlooking something here J
AFAIK no one designed it this way, it "just happened" over time during development. My guess is that people wanted compile flags like "-m64" to be passed when the compiler is used as a front-end to the linker. Since it's been in the default rules for years we cannot change it without breaking compatibility. All of this was developed before CMake supported Fortran. I've seen very few C and C++ compilers that do not accept/ignore all of their compiler flags even when used as a linking front-end. That's likely why this wasn't caught at the beginning. -Brad _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake