title: Use a non-default libstdc++ when building CMake?
body: <p>I'm trying to compile cmake-3.1.0-rc1 on RedHat 6.4. I've built and installed gcc/g++ 4.7.4 under /usr/local, but CMake's <code>bootstrap</code> step fails with the following error:</p>
  
  <pre><code>/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by $HOME/src/cmake-3.1.0-rc1/build/Bootstrap.cmk/cmake)
  </code></pre>
  
  <p>Indeed, the file at <code>/usr/lib64/libstdc++.so.6</code> doesn't contain <code>GLIBCXX_3.4.15</code>, but I don't want CMake to use that one. I want it to use the one at <code>/usr/local/lib/libstdc++.so.6</code>, which DOES include <code>GLIBCXX_3.4.15</code> (as evidenced by <code>strings /usr/local/lib/libstdc++.so.6 | grep GLIBCXX</code>).</p>
  
  <p>Is there a way to get the bootstrapped CMake to use the <code>.so</code> under <code>/usr/local</code> instead of <code>/usr/lib64</code>? Ideally it would be some sort of environment variable or CMake flag, as I don't want to modify the CMakeLists files that come with the CMake source.</p>
  
  <p><strong>Edit</strong>: I got the path wrong. It's actually supposed to be <code>/usr/local/lib64</code>.</p>