Commit Graph

14 Commits

Author SHA1 Message Date
Stephen Kelly 9d767810e1 Features: Populate CMAKE_<LANG>_STANDARD_DEFAULT only for supported compilers.
If no compiler feature information is known for a given compiler
version, do not set a language standard default either.  The two
settings must be recorded consistently.
2015-02-04 18:29:53 -05:00
Stephen Kelly a60027a642 Features: Ensure appropriate return value from feature test macros.
GNU-CXX already has complex logic and sets the _result to 0 before
tests which may set it to something else.

Change the other modules to be consistent with that.
2015-01-15 22:13:21 +01:00
Fraser Hutchison 4d52cd36ad Avoid if() quoted auto-dereference when checking for "MSVC"
When testing CMAKE_<LANG>_COMPILER_ID values against "MSVC", do not
allow the definition of the "MSVC" variable to be expanded.
2014-11-19 16:24:54 -05:00
Stephen Kelly 82c283f914 Features: Use the correct dialect flag when recording features.
Avoid using -std=c++1y for compilers which support -std=c++14, for
example.
2014-11-12 22:59:17 +01:00
Stephen Kelly 49b8140e5d Clang: Enable c++14 dialect flag with Clang 3.5. 2014-09-17 14:57:07 +02:00
Stephen Kelly 0b80fc350a Clang: Don't overwrite c++11 compile option value with c++14 flag. 2014-09-17 14:56:16 +02:00
Stephen Kelly cda233194f Features: Record for Clang 3.4
Clang 3.4 supports all features currently known to CMake.
2014-05-20 16:03:48 +02:00
Stephen Kelly 5c04dfe465 Features: Only require AppleClang policy to be NEW on APPLE. 2014-05-14 23:55:34 +02:00
Stephen Kelly 8238a6cd5d Add some COMPILE_OPTIONS for specifying C++ dialect.
These are compiler-specific, compiler version specific, extension specific
and standard version specific.
2014-04-07 16:48:44 +02:00
Stephen Kelly 59b5fdd37c Don't load Clang-CXX from AppleClang-CXX.
The Clang-CXX module is going to get version-specific checks, and
the version system for AppleClang is not the same as Clang.
2014-04-07 16:48:44 +02:00
Brad King 3d8356d486 Clang: Support Windows variants for GNU and MSVC (#13035, #14458)
Teach the compiler identification preprocessor tests to report when
Clang simulates MSVC, and what version.  If not MSVC, assume GNU.

Teach compiler information modules Clang-(C|CXX) to recognize when Clang
simulates MSVC and skip loading the GNU information.

Teach the Windows-MSVC platform information to recognize when it is
loaded as the simulated compiler and use that version information
instead of the real compiler's (different) version scheme.

Add platform modules Windows-Clang-(C|CXX) and support module
Windows-Clang to load either Windows-MSVC or Windows-GNU and wrap
the corresponding information macros.
2013-10-04 13:39:22 -04:00
Stephen Kelly cd1fa537a0 Add a COMPILE_OPTION for a VISIBILITY_INLINES_HIDDEN target property.
This corresponds to the g++ and clang++
option -fvisibility-inlines-hidden on linux. On Windows with MinGW,
this corresponds to -fno-keep-inline-dllexport. That option is
not supported by clang currently.
2013-06-02 12:00:51 +02:00
Brad King 6e34aea93c Clang: Split Compiler/Clang* modules out from GNU (#13550)
While Clang presents an almost identical interface to GNU there will be
some differences.  Split the compiler information modules to allow
separate rules for Clang.  Start by loading the GNU rules but leave a
place to add Clang-specific information.
2012-09-19 14:06:28 -04:00
Brad King 571dc74891 Recognize Clang C and C++ compilers (see #10693)
Map to the platform and compiler information for GNU because the
compilers are command-line compatible for common operations.  Later we
can add Clang-specific features as necessary.  We honor the preferred
capitalization is "Clang", not the common mis-spelling "CLang".
2010-05-17 14:11:20 -04:00