| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Instead, just set the variables for how scanning works since that is
part of the compiler mechanisms.
Fixes: #24198
|
|
|
|
| |
Visual Studio 17.4 now contains official support for what CMake needs.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add `COMPILE_WARNING_AS_ERROR` target property and supporting
`CMAKE_COMPILE_WARNING_AS_ERROR` variable.
`COMPILE_WARNING_AS_ERROR` is initialized by
`CMAKE_COMPILE_WARNING_AS_ERROR`. It is a boolean variable. If it is
true, it expands to a different flag depending on the compiler such that
any warnings at compile will be treated as errors.
Supports compiler ids that I could find a relevant flag for.
|
|
|
|
|
|
|
|
|
|
| |
Since commit f29e1874ad (Compiler/MSVC: use the `-external:I` flag for
system includes, 2020-05-19, v3.22.0-rc1~593^2) we use the new flag
followed by the include directory as a separate argument. Some versions
of `clang-cl` and `clang-tidy` do not support the flag unless the
include directory is attached to it, so use that form instead.
Fixes: #22979
|
|\
| |
| |
| |
| |
| |
| |
| | |
ef47e18ad0 MSVC: Tolerate cxx_std_23 feature on older compiler versions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Raul Tambre <raul@tambre.ee>
Merge-request: !6614
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In commit 3aaf1d91bf (MSVC: C++20 final flag, C++23 support, 2021-05-29,
v3.20.4~7^2~1) we forgot to add `cxx_std_23` to the fallback table for
MSVC versions from VS 2010 through VS 2015. This allows project to at
least attempt compilation with these compilers since they do not have
any modes.
Issue: #22729
|
| |
| |
| |
| |
| |
| | |
We already do this for `clang-tidy`.
Fixes: #16554
|
|/
|
|
| |
See: #17904
|
|
|
|
|
|
|
| |
Microsoft intends to ship the final C++20 flag in VS 16.11 albeit with a few
parts missing due planned ABI breaking changes.
The current 16.11 Preview 1 toolchain version is 19.29.30129.3, so let's
restrict based on that.
|
|
|
|
|
|
|
| |
`clang-tidy` does not infer driver mode if it is not provided with a
JSON compilation database. This is exactly the way cmake launches it.
Hence clang-tidy will only use the default driver mode. Add an explicit
driver mode argument to avoid this.
|
|\
| |
| |
| |
| |
| |
| | |
2a9ff9703e MSVC: Add support for /JMC (Just My Code)
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3121
|
| | |
|
|/
|
|
|
|
|
| |
Use the infrastructure added by commit 646fb1a646 (CompileFeatures:
memoize C++ compilers with full language level support, 2019-03-27) to
avoid using a `try_compile` to check for C++14 feature support when the
running compiler is known to have all features.
|
|
|
|
|
|
|
| |
Use the infrastructure added by commit 646fb1a646 (CompileFeatures:
memoize C++ compilers with full language level support, 2019-03-27) to
avoid using a `try_compile` to check for C++11 feature support when the
running compiler is known to have all features.
|
|
|
|
|
|
|
| |
Use the infrastructure added by commit 646fb1a646 (CompileFeatures:
memoize C++ compilers with full language level support, 2019-03-27) to
avoid using a `try_compile` to check for C++98 feature support when the
running compiler is known to have all features.
|
| |
|
|
|
|
| |
Issue: #17849
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit v3.9.0-rc1~17^2~4 (Compilers: Port to use default
cmake_record_lang_compile_features macros, 2017-05-10) we run full
per-language-standard feature detection for MSVC. This is not necessary
because the base mode for MSVC has all features we define except for the
meta-features for C++14 and above. Override the default C++ feature
detection macro for MSVC to run detection only once as before.
Fixes: #17274
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Visual Studio 2015 Update 3 introduced the notion of language standard
levels to MSVC. The language standard level is defined in `_MSVC_LANG`
instead of `__cplusplus`. It also added support for the `-std:c++14`
and `-std:c++latest` flags, although the compiler defaults to its C++14
mode anyway. Visual Studio 2017 Update 3 will introduce support for the
`-std:c++17` flag.
Fixes: #16482
|
| |
|
|
|
|
|
|
| |
There are no specific options for MSVC to set language standards, but
set them as empty strings anyways so the feature test infrastructure
can at least check to see if they are defined.
|
|
|
|
| |
Issue: #16468
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
We have no feature tests for versions of VS older than 2010, so do
not even call `record_compiler_features` for such versions. This
is consistent with other compilers where we call this macro only
for versions for which we have recorded features.
|
|
|
|
|
|
| |
If no compiler feature information is known for a given compiler
version, do not set a language standard default either. The two
settings must be recorded consistently.
|
|
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>
|