[cmake-developers] CXX_STANDARD and linking
Brad King
brad.king at kitware.com
Mon Sep 28 13:42:46 EDT 2015
On 09/28/2015 03:55 AM, CHEVRIER, Marc wrote:
> Anyway, the main problem is the fact that, currently, C++ standard handling
> is not usable on Solaris. Do have any plan to fix this problem anytime soon?
>
> On 25/09/15 17:24, "Brad King" wrote:
>> 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.
Steve? According to cmake-compile-features(7) you tested this with
Oracle SolarisStudio version 12.4. However, our dashboard covered
only up through 12.3.
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.
Thanks,
-Brad
More information about the cmake-developers
mailing list