On Sunday, April 05, 2015 08:30 AM, digitalriptide wrote:
I have an Ubuntu installation with both libstdc++ and libc++
installed, and I am using Intel's C++ compiler. By default, CMake is
picking up and linking against libstdc++. Is there a way to ask CMake
to prefer libc++ over libstdc++, when available?

I'm not aware of a way to tell CMake directly, but from what I can gather, you can ask the compiler to prefer libc++ by passing "-stdlib=libc++" to it.

CMAKE_CXX_FLAGS is the easiest the place for that. You may need to add it to linker flags as well, if you link as a separate step.

Ben

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to