summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraSublimeTextGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-1/+1
|
* clang-tidy: modernize-use-autoRegina Pfeifer2019-09-101-1/+1
| | | | | | Set the MinTypeNameLength option to an impossibly high value in order to limit the diagnostics to iterators. Leave new expressions and cast expressions for later.
* cmSourceFile: Rename mutating GetFullPath() overloadDaniel Eiband2019-08-291-3/+3
| | | | Rename mutating GetFullPath() overload to ResolveFullPath().
* cmSourceFile: Rename non-const GetLanguageTushar Maheshwari2019-08-271-3/+3
| | | | | | | | GetOrDetermineLanguage: - Read the property if available - Determine the Language using the file extension Fix all usage of the non-const member in the repository.
* Source sweep: Replace cmExpandList with the shorter cmExpandedListSebastian Holtermann2019-08-231-2/+1
| | | | | | | | | | | | This replaces the code pattern ``` std::vector<std::string> args; cmExpandList(valueStr, args, ...) ``` with ``` std::vector<std::string> args = cmExpandedList(valueStr, ...) ```
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 sweep: Use cmIsOn instead of cmSystemTools::IsOnSebastian Holtermann2019-08-171-1/+1
| | | | | | | | | This replaces invocations of - `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn` - `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND` - `cmSystemTools::IsOn` with `cmIsOn` - `cmSystemTools::IsOff` with `cmIsOff`
* Source code: Use cmExpandList instead of cmSystemTools::ExpandListArgumentSebastian Holtermann2019-08-141-1/+1
|
* clang-tidy: Enable performance-inefficient-string-concatenationSebastian Holtermann2019-08-051-1/+2
| | | | | | | Enables the clang-tidy test performance-inefficient-string-concatenation and replaces all inefficient string concatenations with `cmStrCat`. Closes: #19555
* Modernize: Enable modernize-raw-string-literal in clang-tidyArtur Ryt2019-04-021-4/+4
|
* cmMakefile::GetRequiredDefinition: return const std::string&Vitaly Stakhovsky2019-02-071-1/+1
|
* Factor out enum MessageType into dedicated headerBruno Manganelli2019-01-161-1/+2
| | | | Reduce the number of files relying on `cmake.h`.
* clang-tidy: Remove redundant member initializationsRegina Pfeifer2018-12-151-1/+0
|
* cmLocalGenerator: Remove AddCompileDefinitions methodBrad King2018-10-101-6/+1
| | | | | | | This method offers the same definitions as `GetTargetDefines` except that it excludes the "export" macro on shared libraries. Update call sites to use `GetTargetDefines` instead. Some of them were incorrectly excluding the export macro.
* genex: Simplify cmGeneratorExpressionInterpreterBrad King2018-09-071-6/+6
| | | | | | | | | All callers were constructing with a non-empty target name using the target whose pointer was passed anyway. Drop this argument. Simplify logic accordingly. Re-order constructor arguments to match the cmCompiledGeneratorExpression::Evaluate arguments. Also remove unnecessary getters.
* cmGeneratedFileStream: clang-tidy applied to remove redundant ``c_str`` callsSebastian Holtermann2018-08-071-1/+1
| | | | | | | | | | | | | | | After changing the ``cmGeneratedFileStream`` methods to accept ``std::string const&`` instead of ``const char*`` we don't need to call ``std::string::c_str`` anymore when passing a ``std::string`` to a ``cmGeneratedFileStream`` method. This patch removes all redundant ``std::string::c_str`` calls when passing a string to a ``cmGeneratedFileStream`` method. It was generated by building CMake with clang-tidy enabled using the following options: -DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-4.0;-checks=-*,readability-redundant-string-cstr;-fix;-fix-errors
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-2/+3
| | | | | | | | | | | | 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.
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-2/+1
| | | | | | | | | | * Change some functions to take `std::string` instead of `const char*` in the following classes: `cmMakeFile`, `cmake`, `cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator` and a few others. * Greatly reduce using of `const char*` overloads for `cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`. * Remove many redundant `c_str()` conversions throughout the code.
* sourceFile properties: add property INCLUDE_DIRECTORIESMarc Chevrier2018-01-241-10/+32
|
* sourceFile properties: add property COMPILE_OPTIONSMarc Chevrier2018-01-231-2/+9
| | | | | | | Add the support of per-source property COMPILE_OPTIONS, including generator expressions support. Related: #17507
* Genex: Per-source $<COMPILE_LANGUAGE:...> supportMarc Chevrier2017-12-131-7/+13
| | | | Fixes: #17542
* Add generator expression support to per-source COMPILE_DEFINITIONSMarc Chevrier2017-12-051-5/+9
| | | | | | This allows users to specify different genex-based compile definitions for each file in a target. Fixes: #17508
* Refactor per-source generator expression evaluationMarc Chevrier2017-12-041-3/+2
| | | | | | Prepare to add generator expression support to more source properties. Factor out some duplicated code into a helper to avoid further duplication.
* cmake: Add --open option for IDE generatorsGregor Jasny2017-10-131-0/+23
|
* Meta: replace empty-string assignments with `clear()`.Pavel Solodovnikov2017-09-151-1/+1
|
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-32/+23
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* clang-format: format all code as Cpp11Daniel Pfeifer2017-08-301-1/+1
|
* Use C++11 nullptrDaniel Pfeifer2017-08-241-5/+5
|
* Performance: Add an index to Change cmLocalGenerator::GeneratorTargets.Aaron Orenstein2017-08-161-2/+3
| | | | | | | | | | | Add an index to Change cmLocalGenerator::GeneratorTargets for faster lookup by name. Also changed a bunch of uses of cmLocalGenerator::GetGeneratorTargets() to take const references instead of copying the vector. Represent generator targets as a map (name -> target) to make name lookups more efficient instead of looping through the entire vector to find the desired one.
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-1/+1
| | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* Sublime: Do not build with verbose outputRichard Collins2017-01-101-9/+3
| | | | Remove the hard-coded use of `make VERBOSE=1` and `ninja -v`.
* clang-tidy: apply readability-redundant-string-init fixesDaniel Pfeifer2016-12-121-1/+1
|
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-6/+8
|
* Merge topic 'src-COMPILE_FLAGS-genex'Brad King2016-11-011-1/+5
|\ | | | | | | | | | | 9a58517d Tests: Add case for Xcode per-config per-source COMPILE_FLAGS diagnostic 1e4bb358 Add generator expression support to per-source COMPILE_FLAGS
| * Add generator expression support to per-source COMPILE_FLAGSZsolt Parragi2016-10-281-1/+5
| | | | | | | | | | | | This allows users to specify different genex-based compile flags for each file in a target, e.g. compiling just a single file with `Od/Ox` in release builds on Visual Studio.
* | Sublime: Add option to specify env vars for the .sublime-projectBruno Pedrosa2016-10-271-1/+33
|/ | | | | | | Create a `CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS` variable to control addition of env vars in the `.sublime-project`. Closes: #16387
* Merge topic 'st2-fix-regex'Brad King2016-10-251-1/+3
|\ | | | | | | | | 9f1429e2 Sublime: Update generated diagnostic matching expression for MSVC
| * Sublime: Update generated diagnostic matching expression for MSVCBruno Pedrosa2016-10-241-1/+3
| | | | | | | | | | | | | | | | | | | | Update the generated `file_regex` to match MSVC-style messages in addition to the GCC-style messages already matched. Use non-capturing sub-patterns to tolerate the differences in message formats while still capturing the four pieces of information in proper group numbers (file name, line number, column number, message). Closes: #16375
* | cmState: Port dependents to new cmStateTypes headerStephen Kelly2016-10-191-1/+1
| |
* | cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-7/+7
|/
* Sublime: Exclude build tree from source tree project only optionallyBruno Pedrosa2016-10-121-2/+9
| | | | | | | | Create a `CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE` variable to control addition of the build tree to `folder_exclude_patterns` in the `.sublime-project`. Change the default of this behavior to OFF. Closes: #16351
* Simplify CMake per-source license noticesBrad King2016-09-271-12/+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-4/+7
|
* Make sure unnused parameters are /*named*/Daniel Pfeifer2016-08-161-2/+1
|
* issues: update references to the CMake issue trackerBen Boeckel2016-08-151-1/+1
| | | | | References to specific comments are left as-is since comments were not migrated.
* Refactor extra generator registration to use factoriesTobias Hunger2016-08-031-12/+18
| | | | | | | | | | | This will allow additional information about the availability and capabilities of extra generators to be queried without actually creating them. Instead of a static NewFactory() method like the main generator factories have, use a static GetFactory() method to get a pointer to a statically allocated extra generator factory. This simplifies memory management.
* use CM_NULLPTRDaniel Pfeifer2016-06-281-6/+7
|
* cmExtraSublimeTextGenerator: Use GetTargetCompileFlagsTobias Hunger2016-06-171-24/+3
| | | | | | Replace some custom code with equivalent code from the framework. This also fixes some fixmes left in the custom code.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-214/+158
| | | | | | | | | | | | | 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.