| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was done for C++ by commit v3.5.0-rc1~69^2 (Record compile features
for MinGW Clang on Windows, 2016-01-11). Make the same change for C.
The `UNIX` condition on Clang C compiler features was already dropped by
refactoring in commit v3.9.0-rc1~17^2~4 (Compilers: Port to use default
cmake_record_lang_compile_features macros, 2017-05-10).
Our documentation already claims support for this combination. This
was simply an oversight when support was added for MinGW Clang C++.
Issue: #15897
Issue: #15943
|
|
|
|
|
|
|
| |
The `cl.exe` style command line does not accept the `-std=` options.
Instead behave like MSVC where we don't define standard levels.
Fixes: #16266
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Condition all calls to `_record_compiler_features_{c,cxx}` on
`_result EQUAL 0` so that adding new language standards later does
not need to update them. Avoid some duplicate compiler version
checks by conditioning C11 and CXX14 feature recording on the
existence of `CMAKE_{C11,CXX14}_STANDARD_COMPILE_OPTION` (whose
setting already used the version check).
|
|
|
|
|
| |
Simplify and de-duplicate per-compiler feature recording macros and
convert to a centralized per-language macro.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to commit v3.4.0-rc1~71^2 (Project: Determine default language
dialect for the compiler, 2015-09-15) we always guessed the default
language standard dialect based on the compiler version. This was not
reliable so that commit switched to computing the default language
standard dialect while detecting the compiler id.
When a toolchain file uses CMakeForceCompiler to set the compiler id
then the detection does not occur. Therefore commit v3.4.0-rc1~54^2
(Project: Don't require computed default dialect if compiler was forced,
2015-09-22) made the lack of detection an error only if the compiler was
not forced. However, this means that projects using CMakeForceCompiler
no longer even get the guess that we had before so <LANG>_COMPILER does
not work.
Due to the sophistication of CMake's compiler detection logic projects
should be ported away from using CMakeForceCompiler. In the meantime,
restore a guess of the default language standard dialect when the
compiler is forced.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 7235334a (Project: Determine default language dialect for the
compiler., 2015-09-15) introduced a mechanism to determine the default
dialect used for the running compiler. If conditions in
the <CompilerId>-<Lang>.cmake file are such that compile features for
that version of the compiler should be supported, the _DEFAULT_STANDARD
is set to the computed value.
However, the CMakeForceCompiler module allows users to bypass execution of the
compiler by CMake. In that case, do not set the _DEFAULT_STANDARD variable at
all, which effectively disables the compile-features where the module is used.
No compile features have ever been recorded where the module is used so no
functionality is lost.
|
|
|
|
|
|
| |
Use the __cplusplus and __STDC_VERSION__ macros to automatically
determine the default dialect for the compiler while determining its
id and version.
|
|
|
|
|
|
|
| |
GNU-CXX already has complex logic and sets the _result to 0 before
tests which may set it to something else.
Change the other modules to be consistent with that.
|
|\
| |
| |
| |
| | |
Conflicts:
Modules/Compiler/Clang-C.cmake
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Clang 3.4 uses C99 by default, and Clang 3.6 uses C11 by default:
http://thread.gmane.org/gmane.comp.compilers.clang.devel/39379
GNU 4.9 uses C90 by default, and GNU 5.0 uses C11 by default:
https://gcc.gnu.org/gcc-5/changes.html
Test that the default compiler settings result in the expected dialect
macros being defined for both C and CXX. Remove the unused main.c
file from the CompileFeatures unit test.
|
| | |
|
|/
|
|
|
| |
Avoid using -std=c++1y for compilers which support -std=c++14, for
example.
|
|
|
|
| |
Clang 3.4 supports all features currently known to CMake.
|
|
|
|
|
|
|
| |
While Clang presents an almost identical interface to GNU there will be
some differences. Split the compiler information modules to allow
separate rules for Clang. Start by loading the GNU rules but leave a
place to add Clang-specific information.
|
|
Map to the platform and compiler information for GNU because the
compilers are command-line compatible for common operations. Later we
can add Clang-specific features as necessary. We honor the preferred
capitalization is "Clang", not the common mis-spelling "CLang".
|