<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">I've managed to create a small test case that reproduces the issue, and posted a bug report:
<a href="http://www.cmake.org/Bug/view.php?id=15547" target="_blank">http://www.cmake.org/Bug/view.php?id=15547</a> .  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.<br>
-- <br>
Daniel Schepler<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF597805"><font color="#000000" face="Tahoma" size="2"><b>From:</b> CMake [cmake-bounces@cmake.org] on behalf of Daniel Schepler [dschepler@scalable-networks.com]<br>
<b>Sent:</b> Wednesday, April 29, 2015 11:20 AM<br>
<b>To:</b> cmake@cmake.org<br>
<b>Subject:</b> [CMake] Issues with adding -flto in CMAKE_C[XX]_FLAGS_RELEASE<br>
</font><br>
</div>
<div></div>
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">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.<br>
<br>
Is there something I'm missing that would make this able to work; or is this configuration not supported (yet)?<br>
-- <br>
Daniel Schepler<br>
</div>
</div>
</div>
</div>
</body>
</html>