[cmake-developers] CXX_STANDARD and linking

Brad King brad.king at kitware.com
Thu Oct 8 11:38:00 EDT 2015


On 10/07/2015 03:22 PM, Stephen Kelly wrote:
> The CMake 3.3 behavior of this is the same as it has always been since 
> introducing compile-features for SolarisStudio. 

Well that behavior was broken.  We never had a nightly dashboard for it.
Now I got nightly testing set up and it fails many tests without my changes.

I should have insisted that a 12.4 dashboard client be working
before the features support for it was ever merged to 'master'.
Then we would have found this before broken support was ever
released.

> Any users aware that compile-features only affect compilation will have 
> added the link flag themselves with one of the already available mechanims. 
> Such users will be affected by this CMake 3.4 change.

Since no one complained about this problem before I'm not concerned.
Even if users have this case they were adding workarounds before and
can add different ones now (like just adding -std=c++11 manually).
The whole feature was DOA.

> For the build of CMake itself on Solaris, we should probably add the 
> required link flag until there is a porcelian feature for it (in 
> CompileFlags.cmake?).

This is done already by adding -std=c++03 to CMAKE_CXX_FLAGS.
When CMAKE_CXX_STANDARD is set to 11 then the build breaks when
using CMake 3.3.  It is only building now with CMake_NO_CXX_STANDARD
or with 3.4's reversion of the broken support.

> I'm also not confident in commit v3.4.0-rc1~10^2~1 (Features: Fix C++98 
> flags on Oracle SolarisStudio 12.4 on Linux, 2015-09-30) because it will 
> mean that 'c++98 mode' on Solaris 12.4 is forced to use libstdc++ instead of 
> stlport4 or libCstd (rougewave). I'm not sure of the implications of that.

Without that change CMake fails to generate complaining that
CMAKE_CXX98_EXTENSION_COMPILE_OPTION is not set.  Do you have
another solution for that?

> So, it might be best to revert that commit and its parent.

Or we should revert SolarisStudio compiler features completely even
on Linux.  It was apparently never implemented or tested properly.
Until stdlib selection is implemented then it cannot work.

-Brad



More information about the cmake-developers mailing list