[cmake-developers] CXX_STANDARD and linking (was: C++11 support broken for SolarisStudio 12.4)

Brad King brad.king at kitware.com
Fri Sep 25 11:24:21 EDT 2015


Steve,

On 09/25/2015 03:58 AM, CHEVRIER, Marc wrote:
> * If I add option -std=c++11 in the file .../Test.dir/link.txt,
>   link is successful 

Compiling with a -std= flag should link with such a flag too.
Flags like this are why CMake has always passed CMAKE_CXX_FLAGS
to the C++ compiler when using it to drive the linker.  This does
not appear to be the case anywhere right now when the flag is added
via CXX_STANDARD.

Marc, meanwhile you should be able to bootstrap CMake with

 bootstrap ... -- -DCMake_NO_C_STANDARD=1 -DCMake_NO_CXX_STANDARD

to skip trying to use any -std= flags.

-Brad



More information about the cmake-developers mailing list