summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CompileFeatures
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'fix-crash-on-bad-LANG_STANDARD'Brad King2015-03-024-0/+9
|\ | | | | | | | | 00d66557 Diagnose invalid <LANG>_STANDARD value instead of crashing (#15426)
| * Diagnose invalid <LANG>_STANDARD value instead of crashing (#15426)Brad King2015-02-284-0/+9
| |
* | RunCMake: Remove unneeded files.Stephen Kelly2015-02-091-1/+0
|/ | | | | The default expectation of RunCMake tests is empty content, so there is no need to specify it.
* Features: Define meaning for no language standard defaultBrad King2015-01-292-15/+35
| | | | | | | | | | | | 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-264-2/+2
| | | | | Shorten the NotAFeature_OriginDebug_target_compile_features case name to avoid creating really long paths that fail with some tools on Windows.
* Features: Use a more-common feature in cycle-test.Stephen Kelly2015-01-181-2/+2
| | | | | | We require that the $<$<COMPILE_FEATURES:cxx_feature>:empty2> generates a '1' when CXX11 is enabled. GNU 4.4 does not support cxx_nullptr, but does support cxx_auto_type.
* Features: Update comment in test to match the code.Stephen Kelly2015-01-181-1/+1
| | | | | After commit f13a2eb1 (Features: Adjust the RunCMake test to use more-common features., 2015-01-15).
* Features: Adjust the RunCMake test to use more-common features.Stephen Kelly2015-01-152-6/+6
|
* Tests: Revert workaround for COMPILE_FEATURES genex bugBrad King2015-01-141-1/+1
| | | | | | | The second hunk of commit 07d1f6fc (Features: Properly evaluate if the compiler supports cxx_final, 2014-12-31) was a workaround for a bug in the COMPILE_FEATURES generator expression that caused it never to return 0. Revert the workaround so we can fix the bug instead.
* 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: Properly evaluate if the compiler supports cxx_final.Robert Maynard2015-01-111-2/+2
| | | | | | Previously we expanded HAVE_FINAL to determine what the copied_file number would be, but when we don't have cxx_final than HAVE_FINAL is not defined. What we really want is to use expected_result.
* Tests: Fix RunCMake.CompileFeatures test NonValidTarget2 caseBrad King2014-12-221-0/+2
| | | | | | | Mark the generated source file with the GENERATED property explicitly since it is not marked automatically as the output of any custom command. Mark both the 0 and 1 variants so it works no matter the outcome of the generator expression.
* 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.