summaryrefslogtreecommitdiffstats
path: root/Tests/CompileFeatures
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'test-features-enforce-expectation'Brad King2015-01-271-0/+15
|\ | | | | | | | | | | 67e76e82 Features: Fix test to reject missing expectation definitions 3046be77 Features: Emit a test failure if 'override' is present but not expected
| * Features: Fix test to reject missing expectation definitionsBrad King2015-01-261-0/+12
| | | | | | | | | | | | | | | | | | 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>
| * Features: Emit a test failure if 'override' is present but not expectedStephen Kelly2015-01-261-0/+3
| |
* | Merge topic 'GNU-4.4-compile-features'Brad King2015-01-231-0/+8
|\ \ | | | | | | | | | | | | 374a66b5 Features: Blacklist raw string literals test for GNU 4.4
| * | Features: Blacklist raw string literals test for GNU 4.4Brad King2015-01-221-0/+8
| | | | | | | | | | | | | | | RedHat gcc 4.4.7-11 supports raw string literals, so simply blacklist the test for its rejection.
* | | Merge topic 'GNU-4.4-compile-features'Brad King2015-01-222-1/+12
|\ \ \ | |/ / | | / | |/ |/| | | | | 965a50dc Features: Fix GNU 4.4 and 4.5 C standard level flags 7f4154a4 Features: Fix CompileFeatures non-feature tests for space in path f40c19b5 Features: Fix CompileFeatures test for C non-features
| * Features: Fix CompileFeatures non-feature tests for space in pathBrad King2015-01-211-1/+2
| | | | | | | | | | | | Fix the <lang>_non_features try_compile calls to work correctly when there is a space in the path. Otherwise they all fail due to the space instead of the lack of a feature.
| * Features: Fix CompileFeatures test for C non-featuresBrad King2015-01-211-0/+10
| | | | | | | | | | Add a "feature_test.c" file corresponding to "feature_test.cpp" but for the C language. This source will be needed by C_non_features entries.
* | Merge topic 'GNU-4.4-compile-features'Brad King2015-01-192-13/+14
|\ \ | |/ | | | | | | | | | | | | | | | | | | 004e1540 Features: Record for GNU 4.4. 2a5ca650 Features: Wrap failure-test in UNIX condition. 1ae2c6b2 Features: Blacklist cxx_constexpr test for GNU 4.5. c66e3317 Features: Use a more-common feature in cycle-test. c43a6dc5 Features: Update comment in test to match the code. 78259135 Features: Test presence of cxx_auto_type with genex. 7b9fc88b Features: Remove outdated comment.
| * Features: Blacklist cxx_constexpr test for GNU 4.5.Stephen Kelly2015-01-181-0/+8
| |
| * Features: Test presence of cxx_auto_type with genex.Stephen Kelly2015-01-172-13/+6
| | | | | | | | | | | | 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.
* | Features: Record for SolarisStudio 12.4.Stephen Kelly2015-01-171-0/+18
| | | | | | | | It has similar C++11 capabilities compared to GCC 4.8.
* | Features: Adjust cxx_variadic_templates unit test for SolarisStudio.Stephen Kelly2015-01-171-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | The change in commit 1f19ac4d (Features: Adjust cxx_variadic_templates unit test for GNU < 4.7., 2015-01-11) pacified GNU 4.6, but leaves SolarisStudio 12.4 complaining: "cxx_variadic_templates.cpp", line 5: Error: Partial specialization for Interface<Is...> has identical arguments. 1 Error(s) detected. Implement a preprocessor test for using the partial specialization workaround needed by GNU 4.6.
* | Features: Use variable in cxx_inheriting_constructors test.Stephen Kelly2015-01-171-1/+1
| | | | | | | | Avoid warning with SolarisStudio.
* | Features: Ensure that the cxx_auto_type test is correct.Stephen Kelly2015-01-171-1/+8
|/ | | | | | | | | | | | | | | | | | | | SolarisStudio considers 'auto' to be a storage class specifier in C++98 mode (as appropriate), and considers variables without a specified type to be of type int. So, it treats auto x = 3.14; as auto int x = 3.14; which in C++98 mode is equivalent to int x = 3.14; and it does not fail to compile as expected. Change the test to use a reference so that the type must be known.
* Features: Record for GNU 4.6.Stephen Kelly2015-01-151-2/+6
| | | | | Adjust the CompileFeatures genex_test for the expectation of the OVERRIDE_CONTROL feature group.
* Features: Adjust cxx_variadic_templates unit test for GNU < 4.7.Stephen Kelly2015-01-151-2/+2
| | | | | | | | | | | | | | The unit test for this fails with GNU 4.6: Building CXX object CMakeFiles/test_cxx_variadic_templates.dir/cxx_variadic_templates.cpp.o CompileFeatures/cxx_variadic_templates.cpp: In static member function ‘static int Interface<I, Is>::accumulate()’: CompileFeatures/cxx_variadic_templates.cpp:18:31: sorry, unimplemented: cannot expand ‘Is ...’ into a fixed-length argument list CMakeFiles/test_cxx_variadic_templates.dir/build.make:54: recipe for target 'CMakeFiles/test_cxx_variadic_templates.dir/cxx_variadic_templates.cpp.o' failed The workaround is to use a specialization: http://stackoverflow.com/questions/1989552 http://stackoverflow.com/questions/11297376
* Features: Extend the generalized_initializers test for GNU < 4.7.Stephen Kelly2015-01-151-0/+1
| | | | | That compiler requires a different initializer_list constructor, so update the test to match.
* Features: Update the default_dialect test for old GNU-like compilers.Stephen Kelly2015-01-151-1/+1
| | | | | Prior to GNU 4.7, GNU defined __cplusplus incorrectly, and defined __GXX_EXPERIMENTAL_CXX0X__ in C++11 mode.
* Features: Extend the tests for the COMPILE_FEATURES genex.Stephen Kelly2015-01-152-0/+81
|
* Features: Record for historical Xcode clang versions.Stephen Kelly2015-01-111-0/+20
|
* Features: Quote all compiler names when comparing with COMPILER_IDRobert Maynard2015-01-111-3/+3
| | | | | In preparation of adding MSVC support we need to quote all compiler names, as MSVC is also a CMake variable.
* Features: Add a comment explaining part of test.Stephen Kelly2015-01-031-0/+2
|
* Features: Test nullptr as a side-effect activation of static_assert.Stephen Kelly2015-01-032-3/+23
| | | | | | 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.
* Features: Test feature propagation with more-common features.Stephen Kelly2015-01-031-4/+4
| | | | | | | | | The purpose of the feature listing in these tests is to make other features from the same feature set (eg "C++11 features") available. The compilers under test until now have supported these 'activation features', but MSVC does not. Use the cxx_static_assert feature instead to activate the feature set.
* Features: Test an expectation of whether OVERRIDE_CONTROL is expectedStephen Kelly2015-01-032-0/+4
| | | | | | | | | 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.
* Features: Fix the default C dialect for Clang and GNU.Stephen Kelly2014-11-204-12/+69
| | | | | | | | | | | | | | Clang 3.4 uses C99 by default, and Clang 3.6 uses C11 by default: http://thread.gmane.org/gmane.comp.compilers.clang.devel/39379 GNU 4.9 uses C90 by default, and GNU 5.0 uses C11 by default: https://gcc.gnu.org/gcc-5/changes.html Test that the default compiler settings result in the expected dialect macros being defined for both C and CXX. Remove the unused main.c file from the CompileFeatures unit test.
* Features: Test the CXX compiler only if it has features.Stephen Kelly2014-11-181-28/+30
| | | | | If using different C and CXX compilers, we might not have a feature-full CXX compiler at this point.
* Features: Add support for C++14 features.Stephen Kelly2014-05-2212-1/+140
| | | | Record the features implemented by GNU 4.9 and Clang 3.4.
* Features: Add COMPILE_FEATURES generator expression.Stephen Kelly2014-05-212-0/+35
| | | | | | | | | | | | 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.
* Features: Extend concept to C language.Stephen Kelly2014-05-146-2/+53
| | | | | | | | | | | Add properties and variables corresponding to CXX equivalents. Add features for c_function_prototypes (C90), c_restrict (C99), c_variadic_macros (C99) and c_static_assert (C11). This feature set can be extended later. Add a <PREFIX>_RESTRICT symbol define to WriteCompilerDetectionHeader to conditionally represent the c_restrict feature.
* Test: Parameterize the language in the CompileFeature test.Stephen Kelly2014-05-091-19/+23
|
* Tests: Make CompileFeature tests use highest standard known.Stephen Kelly2014-05-092-3/+29
| | | | | | | | Remove the use of check_cxx_source_compiles which is now just getting in the way. Blacklist the cxx_alignof feature in the test with GNU 4.7. The test file compiles, but it is documented as available first in GNU 4.8.
* Merge topic 'GNU-4.7-features'Brad King2014-05-081-7/+18
|\ | | | | | | | | 9cbc63e4 Features: Record for GNU 4.7.
| * Features: Record for GNU 4.7.Stephen Kelly2014-05-071-7/+18
| | | | | | | | | | Update the CompileFeatures test to verify that unsupported features do not work.
* | cmTarget: Add CXX_STANDARD_REQUIRED to control decay.Stephen Kelly2014-05-071-0/+3
|/
* Features: Make CMAKE_CXX_KNOWN_FEATURES a property.Stephen Kelly2014-05-021-1/+2
| | | | | As a 'built-in' variable it imposes a cost on all variable lookups and it is expected to be rarely used.
* Merge topic 'cxx98-features'Brad King2014-04-301-0/+18
|\ | | | | | | | | a36b957f Features: Add cxx_template_template_parameters.
| * Features: Add cxx_template_template_parameters.Stephen Kelly2014-04-161-0/+18
| | | | | | | | | | Extend the existing feature infrastructure as needed to support both C++11 and C++98 features.
* | Tests: Execute compile features tests unconditionally.Stephen Kelly2014-04-171-0/+8
|/ | | | Conditionally create a dummy test if there are no known features.
* Features: Add cxx_defaulted_move_initializers.Stephen Kelly2014-04-081-0/+7
|
* Features: Add cxx_long_long_type.Stephen Kelly2014-04-081-0/+5
|
* Features: Add cxx_func_identifier.Stephen Kelly2014-04-081-0/+6
|
* Features: Add cxx_local_type_template_args.Stephen Kelly2014-04-081-0/+21
|
* Features: Add cxx_extended_friend_declarations.Stephen Kelly2014-04-081-0/+25
|
* Features: Add cxx_enum_forward_declarations.Stephen Kelly2014-04-081-0/+8
|
* Features: Add cxx_default_function_template_args.Stephen Kelly2014-04-081-0/+12
|
* Features: Add cxx_right_angle_brackets.Stephen Kelly2014-04-081-0/+12
|
* Features: Add cxx_decltype_incomplete_return_types.Stephen Kelly2014-04-081-0/+14
|
* Features: Add cxx_sizeof_member.Stephen Kelly2014-04-081-0/+10
|