summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraCodeBlocksGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* clang-tidy: Replace typedef with usingRegina Pfeifer2019-09-041-1/+1
| | | | | | | | Automate the conversion with perl -i -0pe 's/typedef ([^;]*) ([^ ]+);/using $2 = $1;/g' then manually fix a few places.
* cmSourceFile: Rename mutating GetFullPath() overloadDaniel Eiband2019-08-291-1/+1
| | | | Rename mutating GetFullPath() overload to ResolveFullPath().
* cmSourceFile: Rename non-const GetLanguageTushar Maheshwari2019-08-271-1/+1
| | | | | | | | 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: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-20/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+2
| | | | | | | | | 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-4/+2
|
* clang-tidy: Enable performance-inefficient-string-concatenationSebastian Holtermann2019-08-051-4/+5
| | | | | | | Enables the clang-tidy test performance-inefficient-string-concatenation and replaces all inefficient string concatenations with `cmStrCat`. Closes: #19555
* Use cmAppend to append ranges to std::vector instancesSebastian Holtermann2019-05-231-15/+10
|
* Source: std::string related cleanupVitaly Stakhovsky2019-05-151-25/+22
|
* cmRange: Move to dedicated header fileRegina Pfeifer2019-02-211-0/+1
|
* Merge topic 'modernize-for-loops'Brad King2019-02-111-3/+2
|\ | | | | | | | | | | | | | | | | 01b2d6ab74 Modernize: Use ranged for-loops when possible 15bdbec017 cmAlgorithms: Make cmRange advance/retreat safe for rvalues Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de> Merge-request: !2901
| * Modernize: Use ranged for-loops when possibleArtur Ryt2019-02-071-3/+2
| | | | | | | | | | | | | | Replaced most manual `const_iterator`-based loops and some reverse-iterator loops with range loops. Fixes: #18858
* | cmMakefile::GetRequiredDefinition: return const std::string&Vitaly Stakhovsky2019-02-071-2/+2
|/
* Use cmSourceFile::GetIsGeneratedSebastian Holtermann2019-02-011-1/+1
|
* clang-tidy: Use `= default`Regina Pfeifer2019-01-251-3/+1
| | | | | | Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and `Source/cmUVHandlePtr.h` where a few older compilers require a user-defined default constructor (with `{}`).
* clang-tidy: Remove redundant member initializationsRegina Pfeifer2018-12-151-1/+0
|
* cmMakefile: Make GetSafeDefinition return std::string const&Vitaly Stakhovsky2018-09-181-1/+1
|
* cmGeneratedFileStream: clang-tidy applied to remove redundant ``c_str`` callsSebastian Holtermann2018-08-071-2/+2
| | | | | | | | | | | | | | | 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
* Fix misc. typosluz.paz2018-06-041-1/+1
| | | | Found via `codespell` and `grep`
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-8/+12
| | | | | | | | | | | | 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-8/+6
| | | | | | | | | | * 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.
* Generators: remove KDevelop3 generatorAlex Neundorf2018-01-241-1/+1
| | | | | | | | | | The last KDevelop3 release was many years ago, in 2008 I think. I haven't seen or read about anybody using KDevelop 3 since a long time, so I think it can safely be removed from CMake. KDevelop 4 (first released in 2010) has its own proper CMake support now, independent from this generator. Alex
* CUDA: Add cu as default source file extensionRobert Maynard2018-01-081-2/+2
|
* Merge topic 'CodeBlocks-custom-compiler-id'Brad King2017-11-291-0/+7
|\ | | | | | | | | | | | | e04f1d1b CodeBlocks: add option for the CB compiler ID Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1512
| * CodeBlocks: add option for the CB compiler IDMelven Roehrig-Zoellner2017-11-271-0/+7
| | | | | | | | | | | | | | | | CodeBlocks uses his own compiler ID string which may differ from CMAKE_<LANG>_COMPILER_ID. In particular CodeBlocks supports a large number of different compiler configurations (with different IDs) This commit adds a cache variable "CMAKE_CODEBLOCKS_COMPILER_ID", so the user might adjust it when needed.
* | Performance: Improve efficiency of source file lookup in cmMakefileAaron Orenstein2017-11-171-8/+2
|/ | | | | | | | | This reintroduces the change from commit v3.10.0-rc1~69^2 (Performance: Improve efficiency of source file lookup in cmMakefile, 2017-08-17) with some corrections. The original was rolled back by commit v3.10.0-rc1~52^2~1 (Revert "Performance: ...", 2017-09-25) due to incompatibilities found. The rollback was followed-up by addition of a test for the offending case, and this revision passes the test.
* CodeBlocks: add option to exclude external filesAlexandr (Sagrer) Gridnev2017-09-141-0/+20
| | | | | | | | | | | | Add variable `CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES` to optionally exclude files from outside the project root from the project file written by the CodeBlocks extra generator. This optionally restores logic that had been removed by commit v2.8.3~40^2 (CodeBlocks Generator: Do not omit files in the project file listing, 2010-10-05) in response to QTCREATORBUG-2250. Issue: #12110 Fixes: #17188
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-91/+61
| | | | | | 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-2/+2
|
* CodeBlocks: Avoid listing files multiple timesAlexandr (Sagrer) Gridnev2017-08-301-6/+7
| | | | Fixes: #17187
* Use C++11 nullptrDaniel Pfeifer2017-08-241-6/+6
|
* Performance: Add an index to Change cmLocalGenerator::GeneratorTargets.Aaron Orenstein2017-08-161-4/+6
| | | | | | | | | | | 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.
* Add const-reference qualificationsPavel Solodovnikov2017-05-261-4/+4
|
* Allow CodeBlocks for NMake Makefiles JOMKonstantin Podsvirov2017-01-101-1/+2
|
* clang-tidy: apply readability-redundant-control-flow fixesDaniel Pfeifer2016-12-121-1/+0
|
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-6/+5
|
* cmState: Port dependents to new cmStateTypes headerStephen Kelly2016-10-191-1/+1
|
* cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-21/+21
|
* 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-3/+10
|
* CodeBlocks: List C++ includes firstKevin Ottens2016-08-261-2/+2
| | | | | | | | When using the Clang Code Model in QtCreator, it turned out that having the C system include dirs can make it report false positives for most uses of the STL. This is due to the order the Clang Code Model looks at the include directories and some C includes in /usr/include could be incompatible with the used STL if found first.
* CMake: don't use else after returnDaniel Pfeifer2016-08-181-22/+21
|
* issues: update references to the CMake issue trackerBen Boeckel2016-08-151-2/+2
| | | | | References to specific comments are left as-is since comments were not migrated.
* Refactor extra generator registration to use factoriesTobias Hunger2016-08-031-11/+17
| | | | | | | | | | | 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-7/+7
|
* Merge topic 'CodeBlocks-generated-sources'Brad King2016-06-171-2/+4
|\ | | | | | | | | afd6cc6b CodeBlocks: Show generated files in non-utility targets
| * CodeBlocks: Show generated files in non-utility targetsEnrico Bedau2016-06-161-2/+4
| | | | | | | | | | | | | | | | | | | | | | Since 2.6.3 the UTILITY target may have source files. A defect was filed that these files are now visible in the source tree. A fix later removed all generated files from the source tree, regardless of the target type. You can't even include them by using the SOURCES option. This fix adds generated files again, except for the UTILITY target which cluttered the source tree. Fixes #14272.
* | Merge topic 'CodeBlocks-include-order'Brad King2016-06-171-7/+11
|\ \ | |/ |/| | | | | 76b462ea cmExtraCodeBlocksGenerator: Do not shuffle include directories
| * cmExtraCodeBlocksGenerator: Do not shuffle include directoriesTobias Hunger2016-06-171-7/+11
| | | | | | | | | | Report include directories in a sensible order. Do not shuffle them when trying to make them unique.
* | Merge topic 'size-empty'Brad King2016-06-031-2/+2
|\ \ | | | | | | | | | | | | c6220de2 Use the empty() method to check for emptyness.