summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CompileFeatures
Commit message (Collapse)AuthorAgeFilesLines
* Features: Enable compiler extensions by default.Stephen Kelly2014-05-318-4/+4
| | | | | | | | | | | Compilers enable their extensions by default, and disabling them implicitly can lead to results which are surprising or non-obvious to debug. http://public.kitware.com/pipermail/cmake-developers/2014-May/010575.html http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10214 https://www.mail-archive.com/cmake-developers@cmake.org/msg10116.html (Compiler feature extensions by default, 29 May 2014)
* Features: Add COMPILE_FEATURES generator expression.Stephen Kelly2014-05-2113-0/+94
| | | | | | | | | | | | 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-149-0/+48
| | | | | | | | | | | 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-102-4/+4
|
* Merge topic 'minor-cleanups'Brad King2014-05-082-2/+2
|\ | | | | | | | | | | | | 47795421 Fix whitespace in docs. aa283b6b Features: Fix test for GNU 4.8.1. bbfd4cd4 Features: Include the language of the compiler in error messages.
| * Features: Include the language of the compiler in error messages.Stephen Kelly2014-05-072-2/+2
| |
* | cmTarget: Add CXX_STANDARD_REQUIRED to control decay.Stephen Kelly2014-05-0726-0/+102
|/
* Features: FATAL_ERROR on compilers with no recorded features.Stephen Kelly2014-04-178-0/+37
| | | | | | 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-074-0/+11
| | | | | | | | | | | 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-0713-0/+63
| | | | | | | | | | | 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-074-0/+7
| | | | | | 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-076-0/+19
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.