summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake
Commit message (Collapse)AuthorAgeFilesLines
* CompileFeatures: Makes tests work with meta-feature onlyChuck Atkins2017-05-291-2/+3
|
* Project: Determine default language dialect for the compiler.Stephen Kelly2015-09-181-1/+1
| | | | | | Use the __cplusplus and __STDC_VERSION__ macros to automatically determine the default dialect for the compiler while determining its id and version.
* Diagnose invalid <LANG>_STANDARD value instead of crashing (#15426)Brad King2015-02-281-0/+2
|
* Features: Define meaning for no language standard defaultBrad King2015-01-291-15/+21
| | | | | | | | | | | | Define an empty string in CMAKE_<LANG>_STANDARD_DEFAULT to mean that the toolchain has no notion of lanuage standard levels. In this case the <LANG>_STANDARD[_REQUIRED] properties will have no effect. Update the RunCMake.CompileFeatures test to exclude the LinkImplementationFeatureCycle test when there is no standard default. It can never fail because no use of specific features will adjust the CXX_STANDARD level required for any target since the standard levels have no meaning in this case.
* Tests: Shorten paths in RunCMake.CompileFeaturesBrad King2015-01-261-1/+1
| | | | | Shorten the NotAFeature_OriginDebug_target_compile_features case name to avoid creating really long paths that fail with some tools on Windows.
* Revert topic 'feature_record_msvc'Brad King2015-01-141-7/+2
| | | | | | | | | | | 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.
* Features: Enable writing of MSVC compiler feature header.Robert Maynard2015-01-111-2/+7
| | | | | | | | | | | | | | | | | 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.
* Features: Add COMPILE_FEATURES generator expression.Stephen Kelly2014-05-211-0/+10
| | | | | | | | | | | | 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-141-0/+9
| | | | | | | | | | | 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.
* Tests: Make CompileFeatures feature list lang-specific.Stephen Kelly2014-05-101-3/+3
|
* cmTarget: Add CXX_STANDARD_REQUIRED to control decay.Stephen Kelly2014-05-071-0/+15
|
* Features: FATAL_ERROR on compilers with no recorded features.Stephen Kelly2014-04-171-0/+11
| | | | | | Users of the new target_compile_features command are expected to check the existence of the CMAKE_CXX_COMPILE_FEATURES variable before attempting to use it to require features.
* Add target_compile_features command.Stephen Kelly2014-04-071-0/+1
| | | | | | | | | | | This can be used to set the compiler features required by particular targets. An error is issued at CMake time if the compiler does not support the required feature. If a language dialect flag is required by the features used, that will be added automatically. Base the target_compile_features command on cmTargetPropCommandBase. This gives us 'free' handling of IMPORTED, ALIAS, INTERFACE, non-compilable and missing targets.
* cmTarget: Transitively evaluate compiler features.Stephen Kelly2014-04-071-0/+4
| | | | | | | | | | | Extend the interface of the target_compile_features command with PUBLIC and INTERFACE keywords. Populate the INTERFACE_COMPILER_FEATURES target property if they are set. Consume the INTERFACE_COMPILER_FEATURES target property from linked dependent targets to determine the final required compiler features and the compile flag, if needed. Use the same pattern of origin-debugging which is used for other build properties.
* cmTarget: Allow populating COMPILE_FEATURES using generator expressions.Stephen Kelly2014-04-071-0/+1
| | | | | | Delay validation of the content as a feature if it contains a generator expression. It will be checked again at generate-time after evaluation.
* Features: Add cxx_auto_type.Stephen Kelly2014-04-071-0/+3
Record the availability of this feature for GNU 4.8 on (UNIX AND NOT APPLE) only. In the future, availability can be recorded for earlier GNU, for other platforms and for other compilers. Initially the affected configurations are as restricted as possible to allow for easy testing while extending the features vector in only one dimension. The error message when using the set_property API directly is not very good, but follow up commits will provide origin debugging of the property and a target_compile_features command which will provide a configure-time backtrace when possible.