title: CMake `link_directories` for libstdc++.so
body: <p>I am using CMake's <code>link_libraries</code> code to specify a path to (the folder containing) a particular version of <code>libstdc++.so</code>.</p>
  
  <p>Initially, on a 32-bit machine, this worked fine: running <code>ldd &lt;target&gt;</code> on a built-but-not-installed executable showed that <code>libstdc++.so</code> was pointing to the desired version, and I was able to run <code>ctest</code> to execute tests even though the system <code>libstdc++.so</code> is older than what the tests require.</p>
  
  <p>When I ported the code to a 64-bit machine, however, the desired <code>libstdc++.so</code> path was no longer included in the linked executables. This forces me to (ab)use <code>LD_LIBRARY_PATH</code> to run the project's tests.</p>
  
  <p>I tried to replicate the issue with a small test-case, but I can't get it to include the desired paths on <em>either</em> platform, so it's possible that the issue is not related to the 32-bit to 64-bit porting activity. I have, however, commented out the <code>link_libraries</code> line when building on the 32-bit platform and confirmed that without it, the desired library path is <em>not</em> included. I have also checked many times to ensure that I am specifying a valid path for the desired 64-bit library.</p>
  
  <p>Any idea what else might be going on here?</p>