[cmake-developers] target_compile_features remaining issues
Rolf Eike Beer
eike at sf-mail.de
Thu Apr 10 05:04:29 EDT 2014
Am 10.04.2014 10:44, schrieb Stephen Kelly:
> Rolf Eike Beer wrote:
>
>> Am 08.04.2014 11:43, schrieb Stephen Kelly:
>>> Rolf Eike Beer wrote:
>>>
>>>>> Of course, it is easier to get features into the
>>>>> CMAKE_CXX_KNOWN_FEATURES
>>>>> list when there is only one compiler to test for on the dashboard.
>>>>> I'll
>>>>> add one C++98 feature to establish the infrastructure, but I don't
>>>>> intend
>>>>> to be exhaustive about C++98 features. If you or anyone else has an
>>>>> interest in doing so, I'd recommend getting them in early.
>>>>
>>>> Cool. I think it would be good to get the stuff that is enabled by
>>>> the
>>>> "-AA +hpxstd98" calls on HP-UX 11i into such a feature so we can
>>>> make
>>>> the
>>>> "complex" testcase just select whatever is needed automatically
>>>> instead of
>>>> fiddling around to get the magic flags getting passed into that test
>>>> to
>>>> make the C++ compiler behave like something useful.
>>>
>>> Ok, I don't know anything about the features or flags of that
>>> compiler.
>>>
>>> What features do you have in mind to add?
>>
>> Working <iostream> (IIRC), or anything in std namespace. Basically it
>> looks like the old HP compiler needs +hpxstd98 as compile flag to
>> behave
>> like a C++98 compiler at all, likely because that compiler line is
>> indeed older than 1998 and that simply is not the default as for later
>> versions of that compiler. And the -AA flag is also needed for, uhm,
>> something, at least CMake doesn't build without it.
>
> So far, features which have been added are related to the compiler
> (driver),
> not the standard library. I've deliberately not considered stdlib
> features
> because I don't know how much slower that would make the feature
> checks. You
> would have to run many compile tests. Currently, features are recorded
> by a
> single compilation which checks preprocessor defines.
>
> I'm not convinced this features system is the right tool to solve your
> HP
> stdlib problem. cxx_working_iostreams or cxx_working_stdlib are not
> features
> I envisioned adding when designing it.
>
> I suggest considering alternative solutions, such as simply adding both
> flags in the Compiler/HP.cmake file, a target property or a variable.
I googled a bit around and reread the mails where I was told about that
flags.
Basically "-AA" says "use the new C++ lib", which is what we need.
The "I need working <iostreams> and std namespace" is the result of
+hpxstd98, which they call "advanced template support", or from the
current point of view "C++98 compliant template support". This is really
a compiler thing, adding -AA later if +hpxstd98 is needed would be
simple by just looking at the compiler flags. From what we currently
know these 2 flags are needed only together, but not because they are
related. They are needed because the compilers that need them have
default settings for both things (C++ lib, language support) that are
just too old for what CMake requires.
Eike
More information about the cmake-developers
mailing list