title: Why is CMake using clang instead of system g++ compiler?
body: <p>Despite setting the <code>CMAKE_CXX_COMPILER</code> and <code>CMAKE_C_COMPILER</code> in CMake, doing <code>make</code> on the Makefiles generated by CMake invokes the <code>clang</code> linker. </p>
  
  <p>I want it to use the system <code>g++</code>and <code>gcc</code> compiler. I am on OSX Sierra. </p>
  
  <p>Am I missing a setting somewhere? Here is my CMake setting screenshot. </p>
  
  <p>With <code>clang</code>, I can't get a C++ library compiled as it cannot find <a href="http://www.libpng.org/pub/png/libpng.html" rel="nofollow noreferrer">libpng</a> which is sitting right in my <code>\usr\local\lib</code>. I thought I give it a go with system <code>g++</code> and <code>gcc</code> compilers.   </p>
  
  <p><a href="https://i.stack.imgur.com/WrBII.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WrBII.png" alt="CMake setting"></a>
  <a href="https://i.stack.imgur.com/lk9fN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lk9fN.png" alt="clang linker why?"></a></p>