summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudioGeneratorOptions.cxx
Commit message (Collapse)AuthorAgeFilesLines
* VS: Refactor MSVC character set selectionBrad King2025-10-101-36/+11
|
* MSVC: Always define a character setAJIOB2025-10-071-10/+33
| | | | | | | | | | When targeting the MSVC ABI, define `_MBCS` by default if the project does not define `_SBCS` or `_UNICODE`. Visual Studio has long defined one of the three character set macros automatically. For consistency, define it when compiling for the MSVC ABI with other generators. Add policy CMP0204 for compatibility. Fixes: #27275
* Revise C++ coding style using clang-format with "east const"Kitware Robot2025-01-231-9/+9
| | | | | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`, now with "east const" enforcement. Use `clang-format` version 18. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit. Issue: #26123
* Drop Visual Studio 9 2008 generatorBrad King2024-05-081-18/+8
| | | | This generator has been deprecated since CMake 3.27. Remove it.
* cmLocalVisualStudio7Generator: Make vfproj conditions more explicitBrad King2024-05-081-8/+16
| | | | Avoid relying on the conditions for `vcproj` used by the VS9 generator.
* cmVisualStudioGeneratorOptions: Order version check branches consistentlyBrad King2024-05-071-24/+15
|
* cmVisualStudioGeneratorOptions: Add UsingDebugRuntime methodBrad King2024-02-201-0/+9
|
* cmVisualStudioGeneratorOptions: Rename {IsDebug => UsingDebugInfo}Brad King2024-02-201-1/+1
| | | | The latter name is more precise.
* VS: Consider macros with values when determining CharacterSetDeniz Bahadir2023-11-061-4/+8
| | | | | | | | | | | In order to determine what character-set (Unicode, Multi-Byte, none) shall be set in the generated `*.vcxproj` files, CMake checks if one of the macros `_UNICODE` or `_SBCS` are defined. However, as these macros can be defined with or without a value, the check should always recognize these macros whether they are defined with a value or without. That is now assured by this commit. Fixes: #25379
* strings: use character literals where possibleBen Boeckel2023-07-281-3/+3
|
* cmStrCat: use in Windows-specific sourcesBen Boeckel2023-07-281-1/+1
|
* strings: compare to static `string_view` instances in Windows-only codeBen Boeckel2023-07-271-20/+21
|
* Drop Visual Studio 11 2012 generatorBrad King2023-06-131-1/+0
| | | | This generator has been deprecated since CMake 3.25. Remove it.
* clang-tidy: fix `readability-use-anyofallof` lintsBen Boeckel2022-11-291-12/+4
|
* clang-tidy: fix `modernize-loop-convert` lintsBen Boeckel2022-11-291-5/+5
|
* clang-tidy: fix `modernize-use-auto` lintsBen Boeckel2022-11-291-9/+6
|
* Drop Visual Studio 10 2010 generatorBrad King2022-09-261-12/+9
| | | | This generator has been deprecated since CMake 3.22. Remove it.
* CUDA: MSVC pass all cuda gencode flags via AdditionalOptionsRobert Maynard2022-06-161-65/+6
| | | | Fixes #23491
* Merge topic 'cuda-arch-off-vs'Brad King2022-05-161-4/+5
|\ | | | | | | | | | | | | | | 9fe41ecf36 VS: Fix CUDA CodeGeneration field for CMAKE_CUDA_ARCHITECTURES=OFF Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Raul Tambre <raul@tambre.ee> Merge-request: !7261
| * VS: Fix CUDA CodeGeneration field for CMAKE_CUDA_ARCHITECTURES=OFFBrad King2022-05-131-4/+5
| | | | | | | | | | | | | | | | | | If we add no CUDA architecture flags, write an empty `CodeGeneration` field to tell the CUDA Toolkit's VS integration not to add its default flags. We already use this approach for `CMAKE_CUDA_ARCHITECTURES=all` so that the `-arch=all` flag can be added via `AdditionalOptions`. Fixes: #23490
* | CUDA: Add support for CUDA_ARCHITECTURES=nativeBrad King2022-03-101-1/+2
|/ | | | | | | | | | | CUDA 11.6 added the `nvcc -arch=native` flag to automatically compile for the host GPUs' architectures. Add support for specifying this special `native` value in `CMAKE_CUDA_ARCHITECTURES` and `CUDA_ARCHITECTURES`. During the compiler ABI detection step, detect the native architectures so we can pass them explicitly when using Clang or older versions of nvcc. Fixes: #22375
* CUDA: Support all and all-major on Visual StudioRaul Tambre2022-01-271-0/+4
| | | | | | The Visual Studio integration's CodeGeneration option only knows how to generate a -gencode flag, which doesn't recognize all. Add a special case to pass these two as regular additional flags.
* Make cmGlobalVisualStudioGenerator::VSVersion enum classSumit Bhardwaj2022-01-251-14/+15
|
* Source: Fix possible IWYU warnings in Windows generatorsNAKAMURA Takumi2021-11-191-2/+8
|
* VS: Add Visual Studio 17 2022 generatorBrad King2021-06-251-0/+1
| | | | Fixes: #22339
* VS: Place per-source preprocessor definitions after target-wide onesBrad King2021-06-031-6/+4
| | | | | | | | | | When the VS 2010+ generators were first implemented in commit 7491f52992 (ENH: first pass at VS 10, can bootstrap CMake, but many tests still fail, 2009-06-25, v2.8.0~546), the per-source preprocessor definitions were placed before target-wide preprocessor definitions for consistency with the behavior of VS 9 2008 and below. However, those generators are not used much anymore. Instead prefer consistency with the order used by the Ninja and Makefile generators.
* CUDA: Move VS CudaRuntime selection to be with rest of CUDA optionsBrad King2020-05-221-21/+0
|
* CUDA: Factor runtime library lookup into helper methodBrad King2020-05-221-15/+8
|
* cmGeneratorTarget::GetProperty: return cmPropVitaly Stakhovsky2020-04-291-3/+2
|
* CUDA: Add abstraction for cuda runtime selectionRobert Maynard2020-01-271-14/+24
| | | | | Fixes #17559 Replace our hard-coded default of cudart=static with a first-class abstraction to select the runtime library from an enumeration of logical names.
* cmVisualStudio10TargetGenerator: use std::string for tagVitaly Stakhovsky2019-11-101-3/+3
|
* cmstd: Modernize CMake system headersMarc Chevrier2019-09-201-2/+4
| | | | | | | | | | | | | | Provide a standardized way to handle the C++ "standard" headers customized to be used with current CMake C++ standard constraints. Offer under directory `cm` headers which can be used as direct replacements of the standard ones. For example: #include <cm/string_view> can be used safely for CMake development in place of the `<string_view>` standard header. Fixes: #19491
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is generated by a python script that uses regular expressions to search for string concatenation patterns of the kind ``` std::string str = <ARG0>; str += <ARG1>; str += <ARG2>; ... ``` and replaces them with a single `cmStrCat` call ``` std::string str = cmStrCat(<ARG0>, <ARG1>, <ARG2>, ...); ``` If any `<ARGX>` is itself a concatenated string of the kind ``` a + b + c + ...; ``` then `<ARGX>` is split into multiple arguments for the `cmStrCat` call. If there's a sequence of literals in the `<ARGX>`, then all literals in the sequence are concatenated and merged into a single literal argument for the `cmStrCat` call. Single character strings are converted to single char arguments for the `cmStrCat` call. `std::to_string(...)` wrappings are removed from `cmStrCat` arguments, because it supports numeric types as well as string types. `arg.substr(x)` arguments to `cmStrCat` are replaced with `cm::string_view(arg).substr(x)`
* cmStringAlgorithms: cmIsSpace, cmTrimWhitespace, cmEscapeQuotes, cmTokenizeSebastian Holtermann2019-08-051-2/+2
| | | | | | | | | | This adds the following functions to `cmStringAlgorithms`: - `cmIsSpace` - `cmTrimWhitespace` (moved from `cmSystemTools::TrimWhitespace`) - `cmEscapeQuotes` (moved from `cmSystemTools::EscapeQuotes`) - `cmTokenize` (moved from `cmSystemTools::tokenize` and adapted to accept `cm::string_view`)
* VS: Fix Fortran runtime library flag map special case for '-' optionsBrad King2019-04-101-4/+4
|
* Modernize: Use ranged for-loops when possibleArtur Ryt2019-02-071-4/+3
| | | | | | | Replaced most manual `const_iterator`-based loops and some reverse-iterator loops with range loops. Fixes: #18858
* VS: Add Visual Studio 16 2019 generatorBrad King2019-01-111-0/+1
| | | | | | | | | | | | Add this generator *without* support for specifying the target architecture in the generator name. cmake-gui will be taught to provide a field for this, and command-line builds can use -A. Also, teach this generator to select a default target architecture based on the host architecture. Fixes: #18689 Inspired-by: Egor Pugin <egor.pugin@gmail.com>
* Source: Fix various compiler warnings in Visual Studio 2017Bruno Manganelli2019-01-091-1/+1
|
* cmVisualStudioGeneratorOptions::Parse(): const std::string& argumentVitaly Stakhovsky2018-08-131-3/+3
|
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-1/+2
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* cmVisualStudioGeneratorOptions: specify indentation with integerVitaly Stakhovsky2018-04-251-5/+5
|
* Cleanup: Fix typos and grammar in docs and codeCraig Scott2018-04-221-2/+2
| | | No functional changes, just docs, comments and error messages.
* VS: Simplify XML codeVitaly Stakhovsky2018-03-271-7/+2
| | | | Get rid of suffix arguments
* cmVisualStudioGeneratorOptions: Move XML code to subclassesVitaly Stakhovsky2018-03-261-50/+3
|
* cmVisualStudioGeneratorOptions: Factor out an OutputFlag helperVitaly Stakhovsky2018-03-201-72/+61
|
* cmIDEOptions: use std::stringVitaly Stakhovsky2018-02-261-7/+7
|
* VS: Convert loops to C++11, other C++ improvementsVitaly Stakhovsky2018-02-221-27/+21
|
* VisualStudio generators: refactoringMarc Chevrier2018-01-231-16/+67
| | | | | | Uniformize include directories handling. Fix memory leaks in class cmVisualStudio10TargetGenerator: OptionsMap uses now std::unique_ptr.
* Merge topic 'cuda_msvc_support_complex_gencode_signatures'Brad King2018-01-111-8/+20
|\ | | | | | | | | | | | | a91fde13 CUDA: gencode signature that list multiple code types now supported. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1618
| * CUDA: gencode signature that list multiple code types now supported.Robert Maynard2018-01-101-8/+20
| | | | | | | | Fixes #17263