summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudioGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* clang-tidy: fix `modernize-make-unique` lintsBen Boeckel2022-11-291-1/+3
|
* clang-tidy: fix `modernize-use-equals-default` lintsBen Boeckel2022-11-291-3/+1
|
* VS: Add proj as a project type to VsProjectTypeSumit Bhardwaj2022-02-121-1/+1
| | | | | | | Add `proj` as a project type to VsProjectType so that it can be consumed by `ZERO_CHECK` target. This commit adds the type and cleans up the code that needs to treat `proj` and `csproj` in the same fashion. Next commit will make changes to add `ZERO_CHECK.proj`.
* Consolidate usage of VsProjectTypeSumit Bhardwaj2021-12-231-2/+2
| | | | | | Move ProjectFileExtension handling logic to use ProjectType and remove extraneous checks in .Net SDK style project generation. This change will make introducing new project types relatively simpler.
* VS: Add custom VCEnd labels only in C# projectsSumit Bhardwaj2021-12-161-3/+3
| | | | | | | | | In commit dff98aa9ca (VS: add missing label in C# project-build events, 2021-12-15) the condition for adding our own `VCEnd` label was based on the project being managed or not. Since we support managed C++ projects, switch the condition to be based on whether the project is C#. Issue: #21440
* VS: add missing label in C# project-build eventsSteven Boswell2021-12-151-0/+17
|
* Merge topic 'vs-csproj-scripts'Brad King2021-12-031-10/+1
|\ | | | | | | | | | | | | 13a7ae2194 VS: Revert "Add missing label in C# project-build events" Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6781
| * VS: Revert "Add missing label in C# project-build events"Brad King2021-12-021-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit b284a21fee (VS: Add missing label in C# project-build events, 2021-09-03, v3.22.0-rc1~156^2). The change broke cases using multiple successful custom commands. Revert it pending further investigation into the interaction of the generated script code with `Microsoft.Common.CurrentVersion.targets`, and whether this is needed for all managed projects or just C# projects. Also add a test covering the case that was broken. Fixes: #22964 Issue: #21440
* | Source: Fix possible IWYU warnings in Windows generatorsNAKAMURA Takumi2021-11-191-0/+6
| |
* | cmCustomCommand: Move constructor arguments to individual settersNAKAMURA Takumi2021-11-181-7/+3
|/ | | | | | | | Make `cmCustomCommand` have just only default constructor. Use each setter instead. This follows the builder pattern. Introduce `cc::SetOutputs(std::string output)`. This will be used later, as substitution for `cc::SetOutputs({output})`.
* Rename cmProp in cmValueMarc Chevrier2021-09-211-1/+2
|
* VS: Add missing label in C# project-build eventsSteven Boswell2021-09-091-1/+10
| | | | Fixes: #21440
* VS: Always enable CMAKE_MSVCIDE_RUN_PATHAsit Dhal2021-07-121-1/+1
| | | | | | Do not require a language to be enabled. Fixes: #22343
* cmLocalGenerator: Factor out relative path conversion helpersBrad King2021-05-131-4/+2
| | | | | | Most calls to `MaybeConvertToRelativePath` use one of our common work directories (e.g. top of the build tree) as the local path. Add helpers for each of the common cases to simplify and clarify call sites.
* cmMakefile::GetDefinition: return cmPropVitaly Stakhovsky2020-09-021-3/+2
|
* Add support to indicate UTF-8 custom command pipe output encodingJustin Goshi2020-04-131-1/+3
| | | | | | | | | | | | | | | | | Adds a flag to indicate that pipe output from a custom command should be interpreted as UTF-8 encoded. This change does not introduce a public way to set the flag, but generators that create internally-generated commands know if they are calling cmake, which uses UTF-8 pipes. MSBuild added support for interpreting output of PreBuildEvent, PreLinkEvent, PostBuildEvent, and CustomBuildStep as UTF-8. This change will appear in Visual Studio 16.6 Preview 3. It is opt-in, and you need to add the StdOutEncoding tag. MSBuild treats these as property bags so if we emit the tag for earlier versions of Visual Studio it would be safely ignored. This change emits the StdOutEncoding tag and sets it to UTF-8 whenever the custom command UTF-8 pipe flag is set. This fixes globalization issues when the output from cmake contained characters that required MSBuild to interpret as UTF-8 before displaying them.
* Remove redundant calls to CollapseFullPathBrad King2020-03-241-2/+1
| | | | | Remove calls where it is known the input is already a collapsed full path.
* cmCustomCommand: Explicitly pass backtrace on constructionDaniel Eiband2019-11-241-2/+2
|
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-1/+2
| | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* cmCustomCommandLine: Provide command line make functionsDaniel Eiband2019-09-161-7/+2
| | | | | Reduce boilerplate necessary to create custom command lines by introducing and applying cmMakeCommandLine and cmMakeSingleCommandLine functions.
* cmTarget: Move member `*Commands` to implSebastian Holtermann2019-03-231-0/+1
|
* cmOutputConverter: move ConvertToRelativePath to cmStateDirectory.Bruno Manganelli2019-01-271-3/+4
|
* VS: Use range-based 'for' loops in generator codeVitaly Stakhovsky2017-12-211-9/+5
| | | | Use `auto` for complex types.
* Retire std::auto_ptr and its macro CM_AUTO_PTRMatthias Maennich2017-09-251-2/+2
| | | | Signed-off-by: Matthias Maennich <matthias@maennich.net>
* Meta: replace empty-string assignments with `clear()`.Pavel Solodovnikov2017-09-151-1/+1
|
* VS: only add custom command line if it is not emptyMichael Stürmer2017-09-041-3/+7
|
* Merge topic 'enable_ptx_compilation'Brad King2017-04-211-3/+15
|\ | | | | | | | | | | | | 23691d78 CUDA: Allow sources to be compiled to .ptx files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !725
| * CUDA: Allow sources to be compiled to .ptx filesRobert Maynard2017-04-201-3/+15
| | | | | | | | | | When the target property `CUDA_PTX_COMPILATION` is enabled CUDA OBJECT libraries will generate ptx files instead of object files.
* | Replace boolean `implib` parameters with enumGregor Jasny2017-04-201-2/+4
|/ | | | | Named enumeration values are much clearer at call sites and add more type safety.
* cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-2/+2
|
* 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.
* Convert: Inline uses of START_OUTPUTStephen Kelly2016-09-191-1/+3
|
* fix a load of include-what-you-use violationsDaniel Pfeifer2016-09-031-0/+1
|
* Convert: Replace Convert(FULL) with equivalentStephen Kelly2016-08-271-1/+2
| | | | | This is more explicit than funnelling everything through the Convert method.
* Convert: Replace uses of Convert(NONE)Stephen Kelly2016-08-271-1/+1
| | | | These are equivalent to ConvertToOutputFormat.
* VS: Replace variable with an if()Stephen Kelly2016-08-271-2/+5
|
* Avoid using KWSys auto_ptr by adopting it ourselvesBrad King2016-06-291-2/+2
| | | | | | | | | | | | Replace use of cmsys::auto_ptr with a CM_AUTO_PTR macro that maps to our own implementation adopted from the KWSys auto_ptr implementation. Later we may be able to map CM_AUTO_PTR to std::auto_ptr on compilers that do not warn about it. Automate the client site conversions: git grep -l auto_ptr -- Source/ | grep -v Source/kwsys/ | xargs sed -i \ 's|cmsys::auto_ptr|CM_AUTO_PTR|;s|cmsys/auto_ptr.hxx|cm_auto_ptr.hxx|'
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-57/+45
| | | | | | | | | | | | | 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-8/+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.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort include directives within each block (separated by a blank line) in lexicographic order (except to prioritize `sys/types.h` first). First run `clang-format` with the config file: --- SortIncludes: false ... Commit the result temporarily. Then run `clang-format` again with: --- SortIncludes: true IncludeCategories: - Regex: 'sys/types.h' Priority: -1 ... Commit the result temporarily. Start a new branch and cherry-pick the second commit. Manually resolve conflicts to preserve indentation of re-ordered includes. This cleans up the include ordering without changing any other style. Use the following command to run `clang-format`: $ git ls-files -z -- \ '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '(Lexer|Parser|ParserHelper)\.' | egrep -z -v '^Source/cm_sha2' | egrep -z -v '^Source/(kwsys|CursesDialog/form)/' | egrep -z -v '^Utilities/(KW|cm).*/' | egrep -z -v '^Tests/Module/GenerateExportHeader' | egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' | xargs -0 clang-format -i This selects source files that do not come from a third-party. Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
* 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.
* VS: Port ImplibDir to cmGeneratorTargetStephen Kelly2015-10-241-7/+5
|
* VS: Port ComputeLongestObjectDirectory to cmGeneratorTargetStephen Kelly2015-10-241-1/+1
|
* cmState: Move TargetType enum from cmTarget.Stephen Kelly2015-10-141-2/+2
| | | | | | | 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
* cmGeneratorTarget: Move GetDirectory from cmTarget.Stephen Kelly2015-10-081-2/+4
|
* cmLocalGenerator: Create from already-constructed cmMakefile.Stephen Kelly2015-08-281-3/+2
| | | | Don't manage the lifetime of the cmMakefile with cmLocalGenerator.
* cmLocalGenerator: Remove Parent pointer.Stephen Kelly2015-08-281-2/+1
|
* cmLocalVisualStudioGenerator: Use computed .obj extension (#13685)Bastien Schatt2015-08-181-2/+2
| | | | | | | | CMAKE_<LANG>_OUTPUT_EXTENSION tells us the proper extension for the current toolchain. Teach the ComputeObjectFilenames method to use GetLanguageOutputExtension to look up the extension instead of hard-coding ".obj". This is already done in the code path for explicit file names inside our call to GetObjectFileNameWithoutTarget.
* cmLocalGenerator: Require a valid cmState::Snapshot in the ctor.Stephen Kelly2015-05-271-2/+3
| | | | | | | | | | | Refactor the local generator creation API to accept a cmState::Snapshot. Adjust MakeLocalGenerator to use the 'current' snapshot in cases where there is no parent. Create the snapshot for subdirectories in cmMakefile::AddSubdirectory. This means that snapshots are now created at the point of extending the tree, as appropriate, and independently of the cmLocalGenerator and cmMakefile they represent the state for.
* Use cmSystemTools::GetCMakeCommand() to get path to cmake internallyBrad King2015-05-201-1/+1
| | | | | This is much simpler than finding a way to lookup "CMAKE_COMMAND" everywhere.