summaryrefslogtreecommitdiffstats
path: root/Source/cmLoadCommandCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-3/+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.
* cmstd: Modernize CMake system headersMarc Chevrier2019-09-201-1/+1
| | | | | | | | | | | | | | 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
* Refactor: Use cmStrCat to construct error stringsAsit Dhal2019-09-181-4/+3
| | | | | Replace string construction using std::stringstream with cmStrCat and cmWrap.
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-4/+4
|
* cmCommand refactor: cmLoadCommandCommandGabor Bencze2019-08-251-14/+14
|
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)`
* cmMakefile: Let AddDefinition accept a value as cm::string_viewSebastian Holtermann2019-07-241-1/+1
| | | | | | | | | | | | | | | | This changes `cmMakefile::AddDefinition` to take a `cm::string_view` as value argument instead of a `const char *`. Benefits are: - `std::string` can be passed to `cmMakefile::AddDefinition` directly without the `c_str()` plus string length recomputation fallback. - Lengths of literals passed to `cmMakefile::AddDefinition` can be computed at compile time. In various sources uses of `cmMakefile::AddDefinition` are adapted to avoid `std::string::c_str` calls and the `std::string` is passed directly. Uses of `cmMakefile::AddDefinition`, where a `nullptr` `const char*` might be passed to `cmMakefile::AddDefinition` are extended with `nullptr` checks.
* cmState: Add scripted commands by valueRegina Pfeifer2019-07-211-1/+2
|
* cmLoadCommandCommand: Port away from FinalPassDaniel Pfeifer2019-07-181-19/+5
|
* cmLoadCommandCommand: Code cleanupRegina Pfeifer2019-07-181-73/+91
|
* modernize: manage cmCommand instances using unique_ptr.Marc Chevrier2019-07-141-5/+9
|
* Fix invalid ///! doxygen comment line startsSebastian Holtermann2019-03-311-1/+1
| | | | | In various places `///!` was used to start a comment line. This is not valid Doygen syntax. This patch replaces `///!` comment starts with `//!`.
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-1/+1
| | | | | | | | | | | | 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.
* Replace empty-string comparisons with checking against `empty()`.Pavel Solodovnikov2017-09-211-1/+1
|
* Use C++11 override instead of CM_OVERRIDEBrad King2017-09-151-5/+5
| | | | | | | | We now require C++11 support including `override`. Drop use of the old compatibility macro. Convert references as follows: git grep -l CM_OVERRIDE -- '*.h' '*.hxx' '*.cxx' | xargs sed -i 's/CM_OVERRIDE/override/g'
* use static_cast<> for casts from void*Rolf Eike Beer2017-09-011-1/+1
|
* Replace C-style castsDaniel Pfeifer2017-08-271-9/+7
|
* Use C++11 nullptrDaniel Pfeifer2017-08-241-6/+6
|
* cmCommand: remove unused methods from interface and all implementationsDaniel Pfeifer2017-05-111-5/+0
|
* cmState: introduce method for adding scripted commandsDaniel Pfeifer2017-05-111-1/+1
|
* fix some include-what-you-use diagnosticsDaniel Pfeifer2017-02-171-7/+6
|
* cmDisallowedCommand: extract policy checking from cmCommandDaniel Pfeifer2017-02-131-5/+0
| | | | Implement cmDisallowedCommand as a wrapper class for cmCommand.
* Remove redundant c_str() callsDaniel Pfeifer2016-10-301-4/+4
|
* Merge topic 'remove-cmobject-uses'Brad King2016-10-241-2/+0
|\ | | | | | | | | | | | | | | | | 2214011f Make cmCPackGenerator not inherit from cmObject 7f9a8d53 Make cmCPackGeneratorFactory not inherit from cmObject fb0b087c Make cmCTestGenericHandler not inherit from cmObject 2169b0fa Make cmCPackLog not inherit from cmObject 9855ebf1 Make cmCommand not inherit from cmObject
| * Make cmCommand not inherit from cmObjectDaniel Pfeifer2016-10-221-2/+0
| |
* | Fix newly discovered clang-tidy issuesDaniel Pfeifer2016-10-211-1/+1
| | | | | | | | | | | | | | Clang-tidy reports some issues only from the currently compiled source file and its associated header file. Separating the compilation of commands exposed some clang-tidy issues that were not reported previously. Fix them.
* | Separate compilation for commands included in cmCommandsDaniel Pfeifer2016-10-211-2/+9
|/
* 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.
* use empty method to check for emptynessDaniel Pfeifer2016-09-151-1/+1
|
* use CM_NULLPTRDaniel Pfeifer2016-06-281-5/+5
|
* mark functions with CM_OVERRIDEDaniel Pfeifer2016-06-271-7/+7
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-107/+88
| | | | | | | | | | | | | 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.
* 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.
* Port cmCommand consumers to cmState.Stephen Kelly2015-04-151-1/+1
|
* Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-1/+1
| | | | All compilers hosting CMake support the std class.
* Remove some c_str() calls.Stephen Kelly2014-03-111-5/+5
| | | | | | Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
* stringapi: Command namesBen Boeckel2014-03-081-1/+1
|
* Add policy CMP0031 to disallow load_commandBrad King2013-10-221-0/+3
|
* Drop builtin command documentationBrad King2013-10-161-35/+0
| | | | | Drop all GetTerseDocumentation and GetFullDocumentation methods from commands. The command documentation is now in Help/command/*.rst files.
* Revert "load_command: Deprecate and document pending removal"Brad King2013-01-071-4/+0
| | | | | This reverts commit d2d43986e7f5013465473a71c393fc3897cecbac. We will add a policy to remove the command more gracefully.
* load_command: Deprecate and document pending removalBrad King2012-11-071-0/+4
| | | | | | | | | This command works only when building projects using the same architecture as the running CMake binary. Since it was introduced CMake has learned macro() and function() to add commands, and the execute_process() command to launch advanced external computations. Add a RunCMake.load_command test to verify the warning appears.
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-16/+16
| | | | | | | | | | | | | | | | | Our Git commit hooks disallow modification or addition of lines with trailing whitespace. Wipe out all remnants of trailing whitespace everywhere except third-party code. Run the following shell code: git ls-files -z -- \ bootstrap doxygen.config '*.readme' \ '*.c' '*.cmake' '*.cpp' '*.cxx' \ '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \ '*.mm' '*.pike' '*.py' '*.txt' '*.vim' | egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' | egrep -z -v '^(Modules/CPack\..*\.in)' | xargs -0 sed -i 's/ \+$//'
* Add 'const' qualifier to some cmCommand membersYury G. Kudryashov2012-02-291-3/+3
| | | | | Use const_cast for the special case in cmFindBase where GetFullDocumentation calls GenerateDocumentation.
* Convert CMake to OSI-approved BSD LicenseBrad King2009-09-281-14/+9
| | | | | | | This converts the CMake license to a pure 3-clause OSI-approved BSD License. We drop the previous license clause requiring modified versions to be plainly marked. We also update the CMake copyright to cover the full development time range.
* ENH: Keep only FinalPass commands in memoryBrad King2009-07-241-0/+2
| | | | | | In cmMakefile we save all invoked commands so that FinalPass can be called on them later. Most commands have no final pass, so we should keep only the few that do.
* ENH: add return and break support to cmake, also change basic command ↵Ken Martin2008-01-231-3/+6
| | | | invocation signature to be able to return extra informaiton via the cmExecutionStatus class
* BUG: Reverting previous change. It did not account for the possibility that ↵Brad King2007-04-201-1/+8
| | | | the loaded command was built with a different compiler.
* ENH: Removed code unnecessary now that DynamicLoader is implemented better.Brad King2007-04-191-8/+1
|
* COMP: Added missing includes. This partially addresses bug#3556.Brad King2006-08-011-0/+6
|