On 10/22/2013 11:31 AM, Stephen Kelly wrote: > Further-on, you responded: > >> Why do you need to check features of a compiler not currently enabled?
That was talking about the platform file tables, not the header. > I thought the VERSION would be optional and would default to > CMAKE_MINIMUM_REQUIRED_VERSION: > > > http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/6726/focus=7812 Yes, okay. >> Actually it appears this header will duplicate most of the compiler >> feature >> knowledge encoded in the CMake platform modules we discussed before. I >> wonder if we can come up with a representation that can be used to >> generate both. > > Probably. However, that means that we either shouldn't use the clang > __has_feature() test that I implemented, or we'll have to duplicate all of > that information anyway. CMAKE_CXX_COMPILER is always set to the proper full path these days, even in the IDE generators, so I wonder if we could actually run it against the header file to detect the features available for the current compiler instead of hard-coding a table in the platform information files. Then the checks would all be done in one place via the preprocessor and __has_feature if available. -Brad -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
