summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudioGeneratorOptions.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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
* | Various typo fixesLuz Paz2018-01-031-1/+1
|/ | | | Some are user-facing. Others are source comments.
* cmIDEOptions: use std::string instead of const char*Vitaly Stakhovsky2017-12-091-4/+3
| | | | Revise method signatures to save a few c_str() conversions.
* VS: Fix MANIFESTUAC link flag map to .vcxproj elementscomicfans2017-09-181-0/+68
| | | | | | | | | | Add special parsing of the flags given in `/MANIFESTUAC:"..."` in order to map them correctly to `.vcxproj` elements. Keep the old incorrect flag table entries for `uiAccess` and `level` flags for compatibility even though they do not really exist. Fixes: #16563
* Use C++11 nullptrDaniel Pfeifer2017-08-241-1/+1
|
* Drop Visual Studio 7 .NET 2003 generatorBrad King2017-04-191-3/+0
| | | | This generator has been deprecated since CMake 3.6. Remove it.
* cmGlobalVisualStudioGenerator: Drop VS7 enumeration valueBrad King2017-04-191-1/+0
| | | | | We no longer support the VS 7.0 (.NET 2002) IDE, so drop the enumeration value corresponding to its version.
* Merge topic 'vs-rc-defines'Brad King2017-03-291-1/+4
|\ | | | | | | | | | | | | | | | | | | | | fff34934 MSVC: Restore _DEBUG preprocessor definition in RC debug builds 79a91538 RC: Add missing CMAKE_RC_FLAGS_<CONFIG> entries to cache c77194ec VS: Honor preprocessor definitions in RC flags 1449f6f6 cmVisualStudio10TargetGenerator: De-duplicate preprocessor defs 8a619e8c cmIDEOptions: Add GetDefines method Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !640
| * cmVisualStudio10TargetGenerator: De-duplicate preprocessor defsBrad King2017-03-281-1/+4
| |
* | VS: Select CUDA code generation architecturesBrad King2017-03-101-0/+51
| | | | | | | | | | Parse the `-gencode=`, `-arch`, and `-code` flags and generate a `CodeGeneration` field in the project file.
* | VS: Select the CUDA runtime libraryBrad King2017-03-101-0/+36
| | | | | | | | | | | | Parse the `-cudart=` option and add a corresponding `CudaRuntime` field to the generated project file. Also add a matching `.lib` to the list of libraries linked.
* | VS: Add basic infrastructure for CUDA generationBrad King2017-03-101-0/+3
| | | | | | | | Generate the `CudaCompile` elements in `.vcxproj` files.
* | VS: Add method to take a value out of the option parser flag mapBrad King2017-03-101-0/+12
| | | | | | | | Remove a flag from the map and return its value.
* | VS: Add method to re-parse specific option parser fieldsBrad King2017-03-101-1/+17
| | | | | | | | | | | | This will allow a client to parse flags, replace the flag tables, and then re-parse a field in which flags for a secondary tool were collected.
* | VS: Add method to clear flag tables of option parserBrad King2017-03-101-0/+7
| |
* | VS: Refactor AdditionalOptions generationBrad King2017-02-151-25/+2
| | | | | | | | | | | | Store unknown flags directly in a flag map entry for `AdditionalOptions` instead of having a separate member for them. This avoids duplicating the output generation logic for the entry.
* | cmVisualStudioGeneratorOptions: Add PrependInerhitedString methodBrad King2017-02-151-0/+11
| |
* | VS: De-duplicate PreprocessorDefinitions tag nameBrad King2017-02-141-5/+5
|/ | | | Store the name in a variable for re-use.
* VS: Teach option map IsDebug() method about C# projectsMichael Stürmer2016-12-071-1/+11
|
* iwyu: Fix VisualStudio specific issuesDaniel Pfeifer2016-11-281-0/+1
|
* VS: Place source-specific AdditionalOptions after target-wide flagsBrad King2016-11-021-2/+3
| | | | | | | | | | Flags specified in the `COMPILE_FLAGS` source-file property should be placed after those in target-wide properties so that those on individual source files can override those on the whole target. This is already done by most generators but was not implemented correctly for VS 2010 and above. Closes: #16400
* VS: Add internal API for detecting "managed" projectsMichael Stürmer2016-10-191-0/+5
| | | | | This is in preparation for adding CSharp language support to the VS generator.
* VS15: Add Visual Studio 15 generatorBrad King2016-09-071-0/+1
| | | | | | | | | | | | | | | | Call the generator "Visual Studio 15" without any year because the preview version of VS 15 does not provide a year in the product name. Copy cmGlobalVisualStudio14Generator to cmGlobalVisualStudio15Generator and update version numbers accordingly. Add the VS15 enumeration value. Note that we do not need to add a MSVC15 variable or v150 toolset because Visual Studio 15 comes with an updated version of the v140 toolset and remains ABI-compatible. Teach tests VSExternalInclude, RunCMake.GeneratorPlatform, and RunCMake.GeneratorToolset to treat VS 15 as they do VS 10-14. Closes: #16143
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-182/+112
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * 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.
* Remove `//------...` horizontal separator commentsBrad King2016-05-091-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | Modern editors provide plenty of ways to visually separate functions. Drop the explicit comments that previously served this purpose. Use the following command to automate the change: $ git ls-files -z -- \ "*.c" "*.cc" "*.cpp" "*.cxx" "*.h" "*.hh" "*.hpp" "*.hxx" | egrep -z -v "^Source/cmCommandArgumentLexer\." | egrep -z -v "^Source/cmCommandArgumentParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmDependsJavaLexer\." | egrep -z -v "^Source/cmDependsJavaParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmExprLexer\." | egrep -z -v "^Source/cmExprParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmFortranLexer\." | egrep -z -v "^Source/cmFortranParser(\.y|\.cxx|Tokens\.h)" | egrep -z -v "^Source/cmListFileLexer\." | egrep -z -v "^Source/cm_sha2" | egrep -z -v "^Source/(kwsys|CursesDialog/form)/" | egrep -z -v "^Utilities/(KW|cm).*/" | xargs -0 sed -i '/^\(\/\/---*\|\/\*---*\*\/\)$/ {d;}' This avoids modifying third-party sources and generated sources.
* Source: Stabilize include orderBrad King2016-04-291-0/+1
| | | | | Each source file has a logical first include file. Include it in an isolated block so that tools that sort includes do not move them.
* Replace foo.size() pattern with !foo.empty().Stephen Kelly2015-08-241-3/+3
|
* cmOutputConverter: Adopt command line escaping codeBrad King2015-07-081-3/+2
| | | | | | | Port code from the KWSys System_Shell APIs into cmOutputConverter. Drop it from our copy of KWSys because upstream will drop it too, and by doing it in this commit 'git blame' may have an easier time connecting the history of the content.
* cmOutputConverter: Adopt EscapeWindowsShellArgument methodBrad King2015-07-081-1/+2
| | | | Move it out of cmSystemTools and into cmOutputConverter.
* VS: Move version information to global generator.Stephen Kelly2015-05-191-13/+13
|
* Fix incremental linking setting for Fortran + VSZack Galbreath2014-11-211-3/+38
| | | | | | | | | | | | | | This commit fixes a bug where it was impossible to specify /INCREMENTAL to Fortran projects built with Visual Studio. The problem was due to the fact that .vfproj files expect the value of this flag to be "linkIncremental{No,Yes}, whereas .vcproj files expect this value to be 0, 1, or 2. The implementation of this fix adds a new data structure for Visual Studio linker flags specific to Fortran. This can easily be extended in the future if more such discrepencies between C/C++ and Fortran linking are discovered.
* Merge topic 'vs-windows-apps'Brad King2014-09-021-0/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 39fefde2 VS: Add test case for Windows Phone and Windows Store 89da8465 MSVC: Define 'WIN32' for Windows Store and Windows Phone ed7f085f Help: Add notes for topic 'vs-windows-apps' dd11ae8f VS: Do not compile C sources as WinRT (#15100) b8e40538 VS: Mark Windows Phone and Store targets as App Containers 0432f062 VS: Always ignore ole32 on Windows Phone 8.0 e6ff2f8b VS: Generate Windows Metadata for WinRT components ee48f4c7 VS: Generate Windows Phone and Windows Store projects as Unicode cb1aceed VS: Add VS_WINRT_COMPONENT property to enable CompileAsWinRT 401269e4 VS: Handle .pfx files explicitly in generator 23782171 VS: Handle AppxManifest sources explicitly in generator bc373c6d VS: Set Window Phone/Store app type in CMake-generated targets d89b2889 VS: Mark CMake-generated targets as Utility in .vcxproj files 03ad8f28 CMakeDetermineCompilerABI: Link with standard libraries on MSVC