The following issue has been SUBMITTED. ====================================================================== https://public.kitware.com/Bug/view.php?id=15940 ====================================================================== Reported By: Guy Harris Assigned To: ====================================================================== Project: CMake Issue ID: 15940 Category: CMake Reproducibility: N/A Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2016-01-28 18:32 EST Last Modified: 2016-01-28 18:32 EST ====================================================================== Summary: There doesn't appear to be a cross-platform way to set flags to be used at compile time but not at link time Description: It appears that if a flag is added to CMAKE_C_FLAGS, it will be used not only at compile time but also at link time, at least for some platform/compiler combinations.
Many such flags are, at best, not helpful at link time, and clutter the command line used for linking. Some might also not work at link time. Unix make, and autotools, keep compiler flags (CFLAGS/CXXFLAGS/etc.) and linker flags (LDFLAGS) separate. CMake should provide a way to do the same. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2016-01-28 18:32 Guy Harris New Issue ====================================================================== -- 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
