I've managed to create a small test case that reproduces the issue, and posted a bug report: http://www.cmake.org/Bug/view.php?id=15547 . It would seem that the issue occurs if you try to update CMAKE_AR and CMAKE_RANLIB after a previous run of CMake - though not if you include those settings on the first CMake run. -- Daniel Schepler ________________________________ From: CMake [cmake-boun...@cmake.org] on behalf of Daniel Schepler [dschep...@scalable-networks.com] Sent: Wednesday, April 29, 2015 11:20 AM To: cmake@cmake.org Subject: [CMake] Issues with adding -flto in CMAKE_C[XX]_FLAGS_RELEASE
I just tried an experiment on our code base, adding -flto to the default values of CMAKE_C_FLAGS_RELEASE and CMAKE_CXX_FLAGS_RELEASE, and setting CMAKE_AR to /usr/bin/gcc-ar-5, CMAKE_RANLIB to /usr/bin/gcc-ranlib-5. However, make VERBOSE=1 shows that the intermediate static libraries are still being created using /usr/bin/ar; and I can't find any other instances of /usr/bin/ar in CMakeCache.txt. That results in lots of BFD warnings showing up, and linker errors at the end. Is there something I'm missing that would make this able to work; or is this configuration not supported (yet)? -- Daniel Schepler
-- 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