Commit Graph

8 Commits

Author SHA1 Message Date
Chuck Atkins
9b112a848a Compilers: Port to use default cmake_record_lang_compile_features macros 2017-05-30 09:34:36 -04:00
Chuck Atkins
37221529c7 MSVC: Add empty definitions for std compile options
There are no specific options for MSVC to set language standards, but
set them as empty strings anyways so the feature test infrastructure
can at least check to see if they are defined.
2017-05-29 13:51:54 -04:00
Brad King
ae1a6815b6 Features: Add infrastructure for C++ 17 language standard
Issue: #16468
2016-12-02 11:22:46 -05:00
Brad King
b0996a3fa2 Features: Add meta-features requesting awareness of a particular standard
A common use case of `target_compile_features` is simply to specify that
the compiler should be run in a mode that is aware of e.g. C++11.  Some
projects simply specify a particular C++11-only feature to request this.
Provide a first-class way to do this by naming features after the
corresponding language standard.  Record them as always available in the
corresponding standard level so that requesting them always ensures that
standard (or higher) is used.
2016-11-02 10:00:28 -04:00
Brad King
8b6cc2518a Features: Centralize per-compiler recording macros
Simplify and de-duplicate per-compiler feature recording macros and
convert to a centralized per-language macro.
2016-11-02 09:51:48 -04:00
Brad King
2d23f7b206 Features: Do not record features on MSVC < 2010
We have no feature tests for versions of VS older than 2010, so do
not even call `record_compiler_features` for such versions.  This
is consistent with other compilers where we call this macro only
for versions for which we have recorded features.
2016-11-02 09:42:18 -04:00
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
Robert Maynard
d3489bdb0b Features: Record for MSVC 2010-2015
Also, in WCDH add MSVC Compatibility for cxx_align{of,as}.

Co-Author: Stephen Kelly <steveire@gmail.com>
Co-Author: Brad King <brad.king@kitware.com>
2015-01-30 09:57:33 -05:00