| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit bd844387df (ROCMClang: Add the ROCm toolkit derived clang
compiler to CMake, 2020-08-28, v3.21.0-rc1~66^2~6) and commit ff0d2858e1
(HIP: Extract clang compiler details from hipcc, 2020-10-21,
v3.21.0-rc1~66^2~5), the separate `ROCMClang` compiler id for `hipcc`
has caused a few problems:
* The compiler id changed from behavior of CMake 3.20 and below,
breaking projects that already built with `hipcc` treated as `Clang`.
* The implementation of `target_compile_features` was incomplete for
the `ROCMClang` identity.
* Only `hipcc` was identified as `ROCMClang`, so after it is unwrapped
to the underlying `clang++`, future runs of new CMake versions on
an existing build tree would not repeat this.
* Clang should be usable as a HIP compiler without the `hipcc` wrapper.
Remove the `ROMClang` compiler identity, and revise HIP language support
to work directly with a Clang compiler.
Reject direct `hipcc` usage as a HIP compiler. For now it cannot be
supported because it interferes with flags CMake needs to pass to Clang.
Fixes: #22536, #22460, #22593
|
| |
|
|
|
|
|
|
|
|
|
| |
Since commit da7ad7997e (WriteCompilerDetectionHeader: Add policy to
remove module, 2020-12-04, v3.20.0-rc1~350^2), the WCDH module is
deprecated. Update the `cmake-compile-features(7)` manual section that
previously recommended WCDH to make such detection the project's
responsibility instead. Move the old content of the section over to the
WCDH module to preserve it.
|
|
|
|
|
|
| |
See justification in the policy documentation.
Closes: #17842
|
|
|
|
| |
Issue: #19715
|
|
|
|
|
|
|
| |
Run the `Utilities/Sphinx/update_versions.py` script to add initial
markup to every top-level document and find module.
Issue: #19715
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This allows defining compat versions of some C/C++ features with the name of the
keyword itself, so all code can look as if it was written for the new language
standard.
|
|
|
|
|
|
|
| |
GCC supports the __null builtin basically forever (since at least 2.95), which
behaves very much like nullptr later does. Use this instead of plain "0" as
fallback value, otherwise passing the define to functions annotated with
__attribute__((sentinel)) will result in a compiler warning.
|
|
|
|
|
|
|
| |
Automate with:
find Modules -type f -print0 | xargs -0 perl -i -0pe \
's/set\(([a-zA-Z0-9_\$\{\}]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
|
|
|
|
| |
fixes #16185
|
|
|
|
|
|
| |
This allows one to generate a header that will basically always work. In case
an unknown compiler or compiler version is encountered it simply falls back to
the unsupported case.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The cmake_parse_arguments command is builtin with version 3.5.
The CMakeParseArguments module is empty and exists for backwards
compatibility with CMake 3.4 and lower.
Remove the includes of CMakeParseArguments from CMake's modules.
The modules are always used with the current version of CMake.
Leave the includes in the tests, as the tests may be run with an older
version of CMake.
|
|
|
|
|
|
| |
The `{c,cxx}_std_*` features are meant for use with
`target_compile_features` but do not make sense for use with
WriteCompilerDetectionHeader. Filter them out of any requested list.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool. Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience. Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.
Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices. It also references version control
history for more precise information. Therefore we no longer need to spell
out the list of Contributors in each source file notice.
Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing". The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.
Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically. Manually fix up shebang lines and trailing
newlines in a few files. Manually update the notices in a few files that the
script does not handle.
|
|
|
|
|
|
|
| |
Automate with:
find Modules -type f -print0 | xargs -0 perl -i -0pe \
's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
|
| |
|
|
|
|
| |
Reported-by: Kevin Godby <godbyk@gmail.com>
|
|
|
|
|
| |
Use just '0' instead of 'static_cast<void*>(0)' because the latter
will not automatically convert to pointers to other types.
|
|
|
|
|
|
|
| |
Also, in WCDH add MSVC Compatibility for cxx_align{of,as}.
Co-Author: Stephen Kelly <steveire@gmail.com>
Co-Author: Brad King <brad.king@kitware.com>
|
|
|
|
| |
It has similar C++11 capabilities compared to GCC 4.8.
|
|
|
|
|
| |
Otherwise we generate defines for C/CXX features unguarded by the presence of
the __cplusplus macro and available to the wrong compiler.
|
| |
|
|
|
|
| |
The SolarisStudio compiler module uses language specific files.
|
|\
| |
| |
| |
| |
| | |
4ce110bb Tests: Revert workaround for COMPILE_FEATURES genex bug
0b7e7e27 Revert topic 'feature_record_msvc'
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| |/
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AppleClang does not support the cxx_thread_local feature, even
though it is based on a Clang version which does support the
feature.
http://stackoverflow.com/a/23850891/2428389
A possible reason for that is that thread_local might be used as
a variable in existing Apple SDK headers.
Extend the WriteCompilerDetectionHeader module to generate a define
for that feature with portability fallbacks. For the avoidance of
making it easy to write code which looks correct but which has odd
runtime behavior, don't set the define symbol at all if no
equivalent keyword is known.
|
|
|
|
|
| |
Apple's Clang 5.1 already supports most of the C and C++ features CMake
enumerates.
|
|\
| |
| |
| |
| | |
4cf5179c WCDH: Make it possible to generate multiple files.
|
| |
| |
| |
| |
| |
| | |
Extend the write_compiler_detection_header interface to allow
specifying a location for supplementary files, and getting the
list of resulting files as a variable.
|
|/
|
|
| |
Remove the mention of it from the docs.
|
|
|
|
|
| |
The prefix must be a C-identifier because it is written as the
prefix of preprocessor macros and possibly structs.
|
|
|
|
| |
Enable the alignment features for Clang.
|
|
|
|
|
|
| |
The DECL part is redundant, and the language part is not needed. The
source language and context already determines the language, so there
is no need to repeat it in the define name.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
ddec418a Features: Add compiler version support to WriteCompilerDetectionHeader.
b7029576 Project: Add configurable name for version computation macros.
78acaafe Project: Separate simulated compiler id from version detection.
567af1a5 WCDH: Issue a better message for version compatibility.
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
| |
Link to it from the documentation of related properties, variables
and commands.
Extend the cmake-developer(7) documentation with notes on
extending feature support for compilers.
|
|
|
|
| |
Clang 3.4 supports all features currently known to CMake.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
Provide a function to write a portable header to detect compiler
features. Generate a preprocessor #error for unknown compilers
and compiler versions whose features are not yet recorded. This
error condition might be relaxed in the future, but for now it
is useful for verification of expectations.
|