Commit Graph

9 Commits

Author SHA1 Message Date
Brad King 67e76e82df Features: Fix test to reject missing expectation definitions
Whenever feature support is added to a compiler, the CompileFeatures
test needs to be updated to set expected availability of features.
Add #error directives to ensure the test fails if expectations are
not set.

Suggested-by: Stephen Kelly <steveire@gmail.com>
2015-01-26 14:41:33 -05:00
Stephen Kelly 3046be7784 Features: Emit a test failure if 'override' is present but not expected 2015-01-26 14:41:33 -05:00
Stephen Kelly 782591350c Features: Test presence of cxx_auto_type with genex.
The purpose of that test is to cover the case where the genex
reports '1', and the feature is chosen to be present on all/most
supported compilers.  GNU 4.4 does not support cxx_nullptr.
2015-01-17 16:07:53 +01:00
Stephen Kelly 06ff525492 Features: Extend the tests for the COMPILE_FEATURES genex. 2015-01-15 21:51:18 +01:00
Brad King 0b7e7e277c Revert topic 'feature_record_msvc'
Revert commits:

 2d738ce3 Help: Add notes for topic 'feature_record_msvc'
 f73718c9 Features: Enable writing of MSVC compiler feature header.
 64c30bdc Features: Record for MSVC C++ 2015 and MSVC C 2010-2015.
 225c0ef8 Features: Record for MSVC 2010-2013.

This topic was merged to master prematurely, so remove it.
2015-01-14 13:35:58 -05:00
Robert Maynard f73718c9b8 Features: Enable writing of MSVC compiler feature header.
Notes:
VS2015 and above are the only MSVC versions to support cxx_final, so remove
usages from the tests, and instead only test for cxx_override.

VS2012 and above to conform to cxx_decltype_incomplete_return_types
proposal, but without support for auto return types the dcl.type.simple
example in the proposal doesn't compile.

VS2013 and above to conform to the updated cxx_contextual_conversions proposal,
but VS2010 and above pass the test.

Compilers such as MSVC have no explicit flags to enable C++11 mode,
it just is always on. So only run the link tests with compilers that require
a flag to specify the language version.
2015-01-11 11:32:36 -05:00
Stephen Kelly c13656e717 Features: Test nullptr as a side-effect activation of static_assert.
Because not all compilers under test support the existing 'activation
features', add another test to ensure that compilers which support
both static_assert and nullptr behave as expected in this test.
2015-01-03 15:14:52 +01:00
Stephen Kelly b3e86f4e97 Features: Test an expectation of whether OVERRIDE_CONTROL is expected
The tests below test the presence of both cxx_final and cxx_override,
only one of which is supported by MSVC.  The test is in part intended
to verify that the COMPILE_FEATURES genex supports multiple arguments
and allows users to define names for groups of features (Clang already
calls cxx_final and cxx_override 'override control' as a group).  Keep
the test, and allow the expectation to be set as appropriate.
2015-01-03 15:09:58 +01:00
Stephen Kelly 0dfe395e3c Features: Add COMPILE_FEATURES generator expression.
Allow setting build properties based on the features available
for a target.  The availability of features is determined at
generate-time by evaluating the link implementation.

Ensure that the <LANG>_STANDARD determined while evaluating
COMPILE_FEATURES in the link implementation is not lower than that
provided by the INTERFACE of the link implementation.  This is
similar to handling of transitive properties such as
POSITION_INDEPENDENT_CODE.
2014-05-21 17:22:32 +02:00