summaryrefslogtreecommitdiffstats
path: root/Tests/CompileFeatures
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* 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 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
|
* Features: Add cxx_thread_local.Stephen Kelly2014-04-081-0/+2
|
* Features: Add cxx_inline_namespaces.Stephen Kelly2014-04-081-0/+26
|
* Features: Add cxx_variadic_macros.Stephen Kelly2014-04-081-0/+12
|
* Features: Add cxx_uniform_initialization.Stephen Kelly2014-04-081-0/+9
|
* Features: Add cxx_generalized_initializers.Stephen Kelly2014-04-081-0/+23
|
* Features: Add cxx_attributes.Stephen Kelly2014-04-081-0/+2
|
* Features: Add cxx_alignof.Stephen Kelly2014-04-081-0/+5
|
* Features: Add cxx_alignas.Stephen Kelly2014-04-081-0/+4
| | | | | | cxx_alignof will be a separate feature known to CMake, because both can be implemented with separate backward compatibility versions.
* Features: Add cxx_extern_templates.Stephen Kelly2014-04-081-0/+12
|
* Features: Add cxx_unrestricted_unions.Stephen Kelly2014-04-081-0/+11
|
* Features: Add cxx_unicode_literals.Stephen Kelly2014-04-081-0/+3
|