| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
`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
|
|
|
|
| |
This step is not normally expected to fail, so warn instead of logging it.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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`.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Simplify and de-duplicate per-compiler feature recording macros and
convert to a centralized per-language macro.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
As a 'built-in' variable it imposes a cost on all variable lookups
and it is expected to be rarely used.
|
|
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.
|