summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio71Generator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* clang-tidy: fix `modernize-use-auto` lintsBen Boeckel2022-11-291-3/+2
|
* clang-tidy: fix `readability-static-accessed-through-instance` lintsBen Boeckel2022-11-291-1/+3
|
* VS: Exclude ZERO_CHECK.proj from .sln for include_external_msprojectSumit Bhardwaj2022-07-201-1/+1
| | | | | | | | | | | | | | | In `cmGlobalVisualStudio7Generator::WriteTargetsToSolution`, we skip writing `ZERO_CHECK.proj` to solution file as the check in `cmGlobalVisualStudioGenerator::IsInSolution` returns `false` for `ZERO_CHECK`. However, we write ZERO_CHECK to ProjectDependencies for external projects as there are no checks in `cmGlobalVisualStudio71Generator::WriteExternalProject`. Similar to `cmGlobalVisualStudioGenerator::IsInSolution`, we introduce `IsDepInSolution(const std::string&)` which excludes `ZERO_CHECK.proj` from being added to sln file for the cases where we have `ZERO_CHECK.proj`. Fixes: #23708
* Source: Fix possible IWYU warnings in Windows generatorsNAKAMURA Takumi2021-11-191-3/+11
|
* Rename cmProp in cmValueMarc Chevrier2021-09-211-4/+4
|
* Refactor: reduce cmToCStr usageMarc Chevrier2021-08-191-3/+3
|
* cmMakefile: Refactor API to better handle empty config valuesRobert Maynard2020-07-031-2/+2
|
* cmGeneratorTarget::GetProperty: return cmPropVitaly Stakhovsky2020-04-291-6/+6
|
* Ninja Multi-Config: Fix issue with framework dependencies and AutogenKyle Edwards2020-02-171-3/+4
| | | | Fixes: #20345
* Source: use std::string in place of const char*Vitaly Stakhovsky2020-01-291-4/+4
|
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)`
* Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgumentSebastian Holtermann2019-08-141-1/+1
|
* cmSystemTools::Error(): new overload accepting std::stringVitaly Stakhovsky2019-01-231-1/+1
|
* Factor out enum MessageType into dedicated headerBruno Manganelli2019-01-161-1/+1
| | | | Reduce the number of files relying on `cmake.h`.
* VS: Convert WriteSLNHeader to non-virtual lookup tableBrad King2019-01-101-6/+0
|
* Merge topic 'fix-custom-target-with-csharp'Brad King2018-11-011-1/+1
|\ | | | | | | | | | | | | | | | | 9040df31e2 Merge branch 'backport-fix-custom-target-with-csharp' 1acd1c2b50 CSharp: Fix regression in VS project type selection for custom target a56edad6d6 CSharp: Fix regression in VS project type selection for custom target Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2549
| * CSharp: Fix regression in VS project type selection for custom targetBrad King2018-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A target created by `add_custom_target` should always be a `.vcxproj` file even if it has `.cs` sources involved in custom commands and such. The latter case was broken by refactoring in commit v3.12.0-rc1~160^2~7 (remove TargetIsCSharpOnly() and use methods from cmGeneratorTarget, 2018-03-19). The reason is that the `HasLanguage` method added by commit v3.12.0-rc1~239^2~6 (cmGeneratorTarget: add HasLanguage() as wrapper for GetLanguages(), 2018-03-19) does not check the target type and so is not a suitable check for deciding the project file extension. The `HasLanguage` method was an attempt at an abstraction that turns out not to work very well. Replace it with a dedicated `IsCSharpOnly` method that considers the target type, sources, and non-transitive `LINKER_LANGUAGE`. Fixes: #18515
* | add_dependencies: Track backtraces internallyBrad King2018-10-181-4/+5
|/ | | | | Record backtraces for "utility" dependencies created by `add_dependencies` calls.
* remove TargetIsCSharpOnly() and use methods from cmGeneratorTargetMichael Stürmer2018-04-231-1/+1
|
* VS: Use range-based 'for' loops in generator codeVitaly Stakhovsky2017-12-211-20/+15
| | | | Use `auto` for complex types.
* Fix trivial typos in textluzpaz2017-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some are user facing. Found using codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt` whereby the whitelist contained: ans dum helpfull emmited emmitted buil iff isnt nto ot pathes substract te todays upto whitespaces
* VS: Do not consider MAP_IMPORTED_CONFIG_<CONFIG> on non-imported targetsBrad King2017-09-131-4/+10
| | | | | | | | | | | | | | | Since commit v3.9.0-rc1~309^2 (include_external_msproject: Honor MAP_IMPORTED_CONFIG_<CONFIG>, 2017-04-04) we accidentally honor `MAP_IMPORTED_CONFIG_<CONFIG>` while generating the `.sln` file entries for normal targets. This causes `devenv.com`-driven builds to use the mapping incorrectly for normal targets. Check that a target really comes from `include_external_msproject` before considering the map. Furthermore, when we do use the map, we should only take the first entry if more than one configuration is specified. Otherwise we end up giving VS a configuration name with a `;` in it. Fixes: #17276
* Drop Visual Studio 7 .NET 2003 generatorBrad King2017-04-191-67/+1
| | | | This generator has been deprecated since CMake 3.6. Remove it.
* include_external_msproject: Honor MAP_IMPORTED_CONFIG_<CONFIG>Beeble2017-04-051-4/+9
| | | | | This allows projects added via `include_external_msproject` to compile the preferred configuration despite different naming conventions.
* VS: Pass whole target to WriteProjectConfigurationsBeeble2017-04-051-1/+1
|
* iwyu: Fix VisualStudio specific issuesDaniel Pfeifer2016-11-281-2/+1
|
* Merge topic 'vs-csharp-prep'Brad King2016-10-201-0/+4
|\ | | | | | | | | | | f27492a4 VS: Add internal API for detecting "managed" projects 4f78b9ff VS: Add CSharp project uuid and file extension
| * VS: Add CSharp project uuid and file extensionMichael Stürmer2016-10-191-0/+4
| | | | | | | | | | This is in preparation for adding CSharp language support to the VS generator.
* | cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-1/+1
|/
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* fix a load of include-what-you-use violationsDaniel Pfeifer2016-09-031-0/+1
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-98/+65
| | | | | | | | | | | | | 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-11/+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.
* Isolate formatted streaming blocks with clang-format off/onBrad King2016-05-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The clang-format tool can do a good job formatting most code, but well-organized streaming blocks are best left manually formatted. Find blocks of the form os << "...\n" "...\n" ; using the command $ git ls-files -z -- Source | egrep -v -z '^Source/kwsys/' | xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \ '<<[^\n]*\n(^ *("[^\n]*("|<<|;)$|;)\n){2,}' Find blocks of the form os << "...\n" << "...\n" << "...\n"; using the command $ git ls-files -z -- Source | egrep -v -z '^Source/kwsys/' | xargs -0 pcregrep -M --color=always -B 1 -A 1 -n \ '<<[^\n]*\n(^ *<<[^\n]*(\\n"|<<|;)$\n){2,}' Surround such blocks with the pair /* clang-format off */ ... /* clang-format on */ in order to protect them from update by clang-format. Use the C-style `/*...*/` comments instead of C++-style `//...` comments in order to prevent them from ever being swallowed by re-formatting of surrounding comments.
* Merge topic 'clang-format-include-order'Brad King2016-05-021-0/+2
|\ | | | | | | | | | | | | | | | | | | | | e1c77472 Format include directive blocks and ordering with clang-format 180538c7 Source: Stabilize include order 0e7bca92 Utilities/Release: Stabilize include order in WiX custom action eb817be0 Tests: Stabilize include order in MFC, VSXaml, and VSWinStorePhone eda313b4 Tests: Stabilize include order in StringFileTest 7110b754 CursesDialog: add missing cmState include d7a5f255 Modules: Remove unused CMakeTestWatcomVersion.c file
| * Source: Stabilize include orderBrad King2016-04-291-0/+2
| | | | | | | | | | 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.
* | Deprecate Visual Studio 7 .NET 2003 generatorBrad King2016-04-281-1/+1
|/ | | | | Update documentation to mark the generator deprecated. Add a warning at the end of generation plus an option to turn off the warning.
* VS: Fix default target support for targets nested inside a folderTaylor Braun-Jones2016-03-231-1/+18
| | | | | It's not actually the first target in a `.sln` file that is treated as the default startup project, but rather the first fully defined target.
* VS: Add option to choose the `.sln` startup project (#15578)Davy Durham2016-03-221-1/+2
| | | | | | | | Add a `VS_STARTUP_PROJECT` directory property to specify the project that should be placed first in the `.sln` file so that it will be selected as the default startup project. Co-Author: Taylor Braun-Jones <taylor.braunjones@avigilon.com>
* VS: Port utility depends to cmGeneratorTargetStephen Kelly2015-10-241-1/+1
|
* VS: Port target depends to cmGeneratorTargetStephen Kelly2015-10-241-1/+1
|
* VS: Port ProjectDepends to cmGeneratorTarget.Stephen Kelly2015-10-241-4/+4
|
* VS: Port TargetIsFortranOnly to cmGeneratorTargetStephen Kelly2015-10-241-1/+1
|
* VS: Port WriteProject to cmGeneratorTargetStephen Kelly2015-10-241-5/+5
|
* cmState: Move TargetType enum from cmTarget.Stephen Kelly2015-10-141-1/+1
| | | | | | | Mostly automated: values=( "EXECUTABLE" "STATIC_LIBRARY" "SHARED_LIBRARY" "MODULE_LIBRARY" "OBJECT_LIBRARY" "UTILITY" "GLOBAL_TARGET" "INTERFACE_LIBRARY" "UNKNOWN_LIBRARY" "TargetType") for i in "${values[@]}"; do git grep -l cmTarget::$i | xargs sed -i "s|cmTarget::$i|cmState::$i|g"; done
* VS: Refactor target ordering logicBrad King2015-09-221-1/+1
| | | | | | | | Refactor cmGlobalVisualStudioGenerator::TargetCompare to store the name of the target that should come first instead of hard-coding "ALL_BUILD". Update client sites to specify "ALL_BUILD" when ordering for .sln files and an empty string otherwise (in cases when "ALL_BUILD" should not be encountered anyway).
* Replace 'foo.size() == 0' pattern with foo.empty().Stephen Kelly2015-08-241-1/+1
|
* Replace 'foo.size() > 0' pattern with !foo.empty().Stephen Kelly2015-08-241-1/+1
|
* cmGlobalGenerator: Require a cmake instance in ctor.Stephen Kelly2015-05-271-2/+2
| | | | It is required anyway, so this makes it explicit.
* VS: Do not accumulate configurations globally (#15577)Brad King2015-05-211-7/+12
| | | | | | | | | | | Drop the VS >= 7 generator's global Configurations member and instead lookup configurations using cmMakefile::GetConfigurations where needed. This avoids accumulating all CMAKE_CONFIGURATION_TYPES values ever encountered by a project() or enable_language() command and allows the final value to be used in each directory. We don't officially support per-directory CMAKE_CONFIGURATION_TYPES values but we certainly should not generate configurations not in the final value in the top level directory.