[cmake-developers] CXX_STANDARD and linking

Brad King brad.king at kitware.com
Mon Sep 28 15:20:03 EDT 2015


On 09/28/2015 02:34 PM, Stephen Kelly wrote:
>> Steve?  According to cmake-compile-features(7) you tested this with
>> Oracle SolarisStudio version 12.4.
> 
> Yes, I tested it on SolarisStudio 12.4, but on linux (Ubuntu). Perhaps 
> that's a relevant difference from 'real' Solaris.

That seems to be the case.  The interaction with C++ runtime library
selection may differ.

Although we had dashboard builds for SolarisStudio 12.3 on SunOS the
compiler feature/standard logic is enabled only for SunPro 5.13 and
above which do not appear until SolarisStudio 12.4.

On 09/28/2015 01:42 PM, Brad King wrote:
> The logic in cmLocalGenerator::AddCompileOptions that selects the final
> <LANG>_STANDARD level and adds a flag for it may need to be factored
> out into a separate step (in Compute?) that selects the level.  Then
> AddCompileOptions can continue to add the compiler flag and we'll need
> new code to add link-time compiler-driver flags based on the selected
> standard level.

Steve, does using <LANG>_STANDARD to put -std= flags on the link line
seem like the right approach to fix this?

This won't be done before CMake 3.4 so for now we should look at
turning off all language standard and compile feature support for
SolarisStudio when not hosted on Linux.

Thanks,
-Brad


More information about the cmake-developers mailing list