Re: [cmake-developers] Recording compiler features for older gcc versions

2017-01-29 Thread Rolf Eike Beer
Am Montag, 9. Januar 2017, 10:59:13 schrieb Rolf Eike Beer:
> I need for several projects the ability to set CMAKE_C_STANDARD on older
> compilers, at least gcc 4.2, but preferably also down to gcc 3.4. I have
> them available, so testing is not the issue. But there are some problems
> besides "just record them".
> 
> The problems that I know of:
> 
> -WriteCompilerDetectionHeader last time had problems when the features for
> the compiler were recorded only for C for a given version, i.e. I can't
> just tell CMake "gcc 3.4ff. know about C99" without also recording C++
> features for that versions

This is actually not true. What happens is that the testcases assume that when 
one of them is set, the other one is set, too. This is also what is causing 
the current test breakage. I'll come up with a patch shortly, but maybe not 
today. The solution is easy: sort the subtests in the CMakeLists.txt and check 
for both variables independently.

Eike

signature.asc
Description: This is a digitally signed message part.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] Recording compiler features for older gcc versions

2017-01-09 Thread Brad King
On 01/09/2017 04:59 AM, Rolf Eike Beer wrote:
> I need for several projects the ability to set CMAKE_C_STANDARD on older 
> compilers

I think it would be fine to add the minimum infrastructure needed for
that and then just disable the WCDH and Tests/* pieces that don't work
with it.  We could also just not document this support.  Until more
people are interested in it that have time to implement it fully, I don't
think we need to fully support it beyond your use case.

> -the standard check for working features is currently auto_type, which is not 
> supported by older compilers. Basically all support long_long_type,

I'm hesitant to switch to long_long_type because that is often supported
by compilers in C++98 mode, so it may defeat the test.

Thanks,
-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


[cmake-developers] Recording compiler features for older gcc versions

2017-01-09 Thread Rolf Eike Beer
I need for several projects the ability to set CMAKE_C_STANDARD on older 
compilers, at least gcc 4.2, but preferably also down to gcc 3.4. I have them 
available, so testing is not the issue. But there are some problems besides 
"just record them".

The problems that I know of:

-WriteCompilerDetectionHeader last time had problems when the features for the 
compiler were recorded only for C for a given version, i.e. I can't just tell 
CMake "gcc 3.4ff. know about C99" without also recording C++ features for that 
versions
-the standard check for working features is currently auto_type, which is not 
supported by older compilers. Basically all support long_long_type, so we 
either need to change that (patch is in my gcc-34-features branch), or we need 
a better way to check what is available at all before using it.

Any help welcome.

Eike
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers