Fix LTO with GCC 4.9
For LTO to work, GCC 4.9 requires using the wrappers gcc-ar and gcc-ranlibs: http://gcc.gnu.org/gcc-4.9/changes.html CMake doesn't account for this yet: http://public.kitware.com/pipermail/cmake-developers/2014-January/009344.html
This commit is contained in:
parent
a1374dd4ba
commit
e22be59f82
|
@ -209,6 +209,10 @@ endif()
|
|||
|
||||
if(ENABLE_LTO)
|
||||
check_and_add_flag(LTO -flto)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
|
||||
set(CMAKE_AR gcc-ar)
|
||||
set(CMAKE_RANLIB gcc-ranlib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
|
|
Loading…
Reference in New Issue