summaryrefslogtreecommitdiffstats
path: root/Modules/Internal/FeatureTesting.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Modules/Internal/FeatureTesting: mark feature testing as a special testBen Boeckel2023-07-311-0/+1
|
* Modules: Drop redundant check logging to CMakeOutput.log and CMakeError.logBrad King2023-01-181-8/+0
| | | | | | | | | | `try_compile` and `try_run` now automatically log checks using them to `CMakeConfigureLog.yaml`. Add `LOG_DESCRIPTION` arguments to some `try_compile` calls to replace the description previously written to the old logs. Issue: #23200
* CompileFeatures: Warn explicitly when feature detection binary is not foundBrad King2023-01-181-4/+7
| | | | This step is not normally expected to fail, so warn instead of logging it.
* Modules: Use new SOURCES_FROM_* try_compile (1/2)Matthew Woehlke2022-09-271-4/+5
| | | | | | | | | | | Modify some modules that ship with CMake to use the new SOURCES_FROM_* arguments to try_compile / try_run as added by commits cb14ae2b87 (try_compile: Add SOURCE_FROM_{ARG,VAR}, 2022-09-21) and 611d801790 (try_compile: Add SOURCE_FROM_FILE, 2022-09-22). This covers users which previously either used an existing file (but sometimes needed to rename it), or which wrote out their source in entirety. It does NOT cover users that actually need configure_file functionality, as those will be more involved to update and will thus be tackled in part 2.
* Modules: Use new keyword-dispatched try_compile signatureMatthew Woehlke2022-09-141-1/+1
| | | | | | | | | | | Modify most of the modules that ship with CMake to use the new try_compile / try_run signatures added by commit aa9220d3a0 (try_compile: Add keyword-dispatched signature, 2022-09-02). This improves debugging by each invocation using its own directory so that the results of multiple invocations can be retained. This does not cover any invocations which provide an entire project, as that flavor of try_compile has not yet been updated.
* HIP: Add language to CMakeRobert Maynard2021-06-071-0/+14
|
* CUDA: Add cuda meta-features (e.g. ``cuda_std_11``) supportRobert Maynard2019-12-101-0/+14
|
* CompileFeatures: memoize C++ compilers with full language level supportRobert Maynard2019-04-091-0/+4
| | | | | | | Previously compilers that had full support for a language standard level were still verified every time a new build directory was created. Now we record this information and insert the correct granular compile features instead of doing a `try_compile`.
* CompileFeatures: memoize C compilers with full language level supportRobert Maynard2019-03-271-0/+11
| | | | | | | Previously compilers that had full support for a language standard level was forced to verify this every time a new build directory was created. Now we record this information and insert the correct granular compile features instead of doing a try_compile.
* CompileFeatures: Don't try_compile for language levels with no featuresRobert Maynard2019-03-201-2/+12
| | | | | | Previously Compilers always had to run a try_compile to determine what language level each feature mapped to. Now we can skip the try_compile when a language level has no features.
* Features: On SunPro link feature check with lang std flagBrad King2017-05-091-0/+10
| | | | | | | Follow up commit e17b179184 (Features: On SunPro link with language standard compiler flag, 2017-04-28) to apply the same fix to the feature checks. The `try_compile` used for these is intentionally not using `CXX_STANDARD`-based logic so that it can test the individual flags.
* Features: Add meta-features requesting awareness of a particular standardBrad King2016-11-021-0/+2
| | | | | | | | | | A common use case of `target_compile_features` is simply to specify that the compiler should be run in a mode that is aware of e.g. C++11. Some projects simply specify a particular C++11-only feature to request this. Provide a first-class way to do this by naming features after the corresponding language standard. Record them as always available in the corresponding standard level so that requesting them always ensures that standard (or higher) is used.
* Features: Centralize per-compiler recording macrosBrad King2016-11-021-1/+9
| | | | | Simplify and de-duplicate per-compiler feature recording macros and convert to a centralized per-language macro.
* Features: Extract strings from test binary more reliably (#15736)Brad King2015-09-101-1/+1
| | | | | | | | | | Since commit v3.1.0-rc1~635^2~7 (project: Add infrastructure for recording CXX compiler features, 2013-10-17) we compile a test source to a binary and then extract "<LANG>_FEATURES:..." strings from the binary with the file(STRINGS) command. Add a newline at the beginning of the string literal to be sure file(STRINGS) can extract the first entry as a string independent of whatever else the compiler may put before the storage it allocates for the literal within the binary.
* Features: Use the features symbol in the feature-test compile.Stephen Kelly2014-05-151-1/+1
| | | | | | | | | | Clang discards the entire string if it is not used, removing the ability to read the features from the compiled binary. That is prevented by using the symbol. GNU with -O3 also discards the string, so use the string in a way which is determined by a runtime value (argc) to prevent it being discarded.
* Project: Use nullary form of main for compile feature tests.Stephen Kelly2014-05-071-1/+1
|
* Project: Remove extern from static string in feature tests.Stephen Kelly2014-05-071-1/+1
|
* Features: Make CMAKE_CXX_KNOWN_FEATURES a property.Stephen Kelly2014-05-021-1/+4
| | | | | As a 'built-in' variable it imposes a cost on all variable lookups and it is expected to be rarely used.
* project: Add infrastructure for recording CXX compiler featuresStephen Kelly2014-04-071-0/+57
Add a feature test using the compiler macros and the preprocessor to determine available features. Add a CMAKE_CXX_COMPILE_FEATURES variable which contains all features known to the loaded compiler, and a CMAKE_CXX_KNOWN_FEATURES variable containing all features known to CMake. Add language standard specific variables for internal use to determine the standard-specific compile flags to use. This will be extended to other languages in the future. Follow-up commits will add features which will be recorded by the feature test.