summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/MSVC-CXX.cmake
Commit message (Collapse)AuthorAgeFilesLines
* MSVC: don't opt into dyndep supportBen Boeckel2022-11-281-1/+0
| | | | | | | Instead, just set the variables for how scanning works since that is part of the compiler mechanisms. Fixes: #24198
* msvc: bless MSVC 19.34 support for C++ modules as experimentalBen Boeckel2022-11-111-0/+12
| | | | Visual Studio 17.4 now contains official support for what CMake needs.
* CMake: Support upcoming C++26 language levelRobert Maynard2022-08-311-0/+1
|
* COMPILE_WARNING_AS_ERROR: Add options to treat warnings as errorsMartin Duffy2022-05-061-14/+3
| | | | | | | | | | | | 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.
* MSVC: Use -external:I flag without space to support Clang toolsBrad King2022-01-111-1/+1
| | | | | | | | | | 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
* Merge topic 'msvc-c++23' into release-3.22Brad King2021-10-121-0/+1
|\ | | | | | | | | | | | | | | 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
| * MSVC: Tolerate cxx_std_23 feature on older compiler versionsBrad King2021-10-071-0/+1
| | | | | | | | | | | | | | | | | | | | 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
* | IWYU: Add `--driver-mode=cl` when applicablePigeonF2021-09-101-0/+1
| | | | | | | | | | | | We already do this for `clang-tidy`. Fixes: #16554
* | Compiler/MSVC: use the `-external:I` flag for system includesBen Boeckel2021-06-181-0/+6
|/ | | | See: #17904
* MSVC: C++20 final flag, C++23 supportRaul Tambre2021-05-291-1/+8
| | | | | | | 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: Add driver mode argumentHanjiang Yu2020-01-271-0/+2
| | | | | | | `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.
* Merge topic 'msvc-jmc'Brad King2019-05-151-0/+5
|\ | | | | | | | | | | | | 2a9ff9703e MSVC: Add support for /JMC (Just My Code) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3121
| * MSVC: Add support for /JMC (Just My Code)Luca Cappa2019-05-141-0/+5
| |
* | CompileFeatures: Record when MSVC gained full CXX14 supportRobert Maynard2019-05-131-0/+1
|/ | | | | | | 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.
* CompileFeatures: Record when compilers gained full CXX11 supportRobert Maynard2019-04-291-15/+1
| | | | | | | 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.
* CompileFeatures: Record when CXX compilers have gained full support for 98Robert Maynard2019-04-111-0/+1
| | | | | | | 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.
* Features: Activate C++ 20 support for MSVC 19.12.25835+Brad King2018-03-271-0/+4
|
* Features: Add infrastructure for C++ 20 language standardBrad King2018-03-271-0/+9
| | | | Issue: #17849
* MSVC: Avoid unnecessary C++ feature detection stepsBrad King2017-09-121-0/+24
| | | | | | | | | | | 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
* MSVC: Extend C++ language standard support to Visual Studio 2015 Update 3Nils Gladitz2017-09-011-1/+4
|
* MSVC: Add flags for C++ language standardsBrad King2017-07-171-1/+19
| | | | | | | | | | | 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
* Compilers: Port to use default cmake_record_lang_compile_features macrosChuck Atkins2017-05-301-12/+2
|
* MSVC: Add empty definitions for std compile optionsChuck Atkins2017-05-291-2/+16
| | | | | | 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.
* Features: Add infrastructure for C++ 17 language standardBrad King2016-12-021-0/+1
| | | | Issue: #16468
* Features: Add meta-features requesting awareness of a particular standardBrad King2016-11-021-0/+5
| | | | | | | | | | 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/+1
| | | | | Simplify and de-duplicate per-compiler feature recording macros and convert to a centralized per-language macro.
* Features: Do not record features on MSVC < 2010Brad King2016-11-021-1/+3
| | | | | | | 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.
* Features: Populate CMAKE_<LANG>_STANDARD_DEFAULT only for supported compilers.Stephen Kelly2015-02-041-2/+5
| | | | | | 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.
* Features: Record for MSVC 2010-2015Robert Maynard2015-01-301-0/+6
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>