summaryrefslogtreecommitdiffstats
path: root/Source/cmFunctionCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Use C++11 override instead of CM_OVERRIDEBrad King2017-09-151-4/+4
| | | | | | | | 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'
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-2/+2
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* cmCommand: remove unused methods from interface and all implementationsDaniel Pfeifer2017-05-111-10/+0
|
* cmState: introduce method for adding scripted commandsDaniel Pfeifer2017-05-111-5/+1
|
* Merge topic 'dead-code-removal'Brad King2017-05-111-1/+1
|\ | | | | | | | | | | | | | | | | fdd341eb cmFindCommon: remove unused function SetMakefile 67a8d907 cmExecutionStatus: Remove arguments from setters 0c519c70 bootstrap: Remove leftovers from cmBootstrapCommands Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !821
| * cmExecutionStatus: Remove arguments from settersDaniel Pfeifer2017-05-091-1/+1
| | | | | | | | | | The setters are only used to set boolean values. The values are never reset individually.
* | cmCommand: remove IsScriptableDaniel Pfeifer2017-05-081-5/+0
|/
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-1/+0
|
* Include necessary headers in commandsDaniel Pfeifer2016-10-261-1/+7
|
* Merge topic 'remove-cmobject-uses'Brad King2016-10-241-7/+2
|\ | | | | | | | | | | | | | | | | 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-7/+2
| |
* | Separate compilation for commands included in cmBootstrapCommands1Daniel Pfeifer2016-10-211-0/+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.
* Avoid else after returnDaniel Pfeifer2016-09-161-3/+2
|
* use empty method to check for emptynessDaniel Pfeifer2016-09-151-1/+1
|
* cmMakefile: Restore nested error logic use of cmExecutionStatusBrad King2016-09-061-3/+3
| | | | | | | | | | | | | | Since commit 14a8d61f (cmMakefile: Port nested error logic away from cmExecutionStatus) we fail to continue processing function and macro bodies after non-fatal errors. A non-fatal error should not stop foreach loops, macro bodies, nested bodies, or the outer script. Add a test covering these cases, and revert the change to fix them. Also revert commit 2af853de (cmMakefile: Simplify IssueMessage implementation) because the assertion it added (which was removed by the above commit and is restored by reverting it) is incorrect. We do have code paths that call cmMakefile::IssueMessage with an empty execution stack, such as in CheckForUnusedVariables's LogUnused call.
* cmMakefile: Port nested error logic away from cmExecutionStatusStephen Kelly2016-08-251-3/+3
| | | | It is no longer needed.
* mark functions with CM_OVERRIDEDaniel Pfeifer2016-06-271-8/+9
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-68/+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.
* cmAlgorithms: Rename cmRange to cmMakeRange.Stephen Kelly2015-07-221-1/+1
|
* cmState: Store execution context.Stephen Kelly2015-07-051-0/+1
| | | | | Extend snapshot creation API to store the file being executed and the entry point to get to that context.
* cmListFileArgument: Remove FilePath member.Stephen Kelly2015-06-211-11/+0
| | | | It is now unused.
* cmMakefile: Add filename context to ExpandArguments.Stephen Kelly2015-06-211-1/+2
| | | | | | | | | The cmListFileArgument currently stores a FilePath for use in this method. The filename is the same as the CMAKE_CURRENT_LIST_FILE, except if executing a macro or function defined in another file. Set the context filename when expanding the arguments of macros and functions using the filename recorded when defining the prototype.
* cmFunctionCommand: Store the FilePath when creating the prototype.Stephen Kelly2015-06-211-0/+3
|
* cmMakefile: Create a unified raii for function scopes.Stephen Kelly2015-06-041-11/+3
|
* Merge topic 'fix-function-missing-endforeach'Brad King2015-05-191-1/+1
|\ | | | | | | | | 3a656065 Fix assertion failure on unmatched foreach in function (#15572)
| * Fix assertion failure on unmatched foreach in function (#15572)Brad King2015-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The lexical scope counting added by commit v3.2.0-rc1~332^2~1 (Track nested loop levels in CMake language with a stack of counters, 2014-11-18) forgot to account for scopes popped by error messages about unclosed scopes. Teach the error handler to pop the lexical scope it reports as unclosed. Re-order the lexical scope RAII object to be inside the variable scope RAII object scope so that the lexical scope is fully closed before we check assertions about variable scopes. Extend the RunCMake.Syntax test with a case covering this.
* | Port cmCommand consumers to cmState.Stephen Kelly2015-04-151-3/+2
| |
* | cmFunctionCommand: Remove ineffectual code.Stephen Kelly2015-02-211-5/+0
| | | | | | | | The name variable is never used.
* | cmFunctionCommand: Replace loops with cmJoin.Stephen Kelly2015-02-121-19/+4
| |
* | cmFunctionCommand: Remove counting variable.Stephen Kelly2015-02-121-9/+5
| | | | | | | | Start iteration at correct starting point directly.
* | cmFunctionCommand: Split loop in two.Stephen Kelly2015-02-121-2/+4
| |
* | Replace common loop pattern with cmJoinStephen Kelly2015-02-111-6/+2
|/
* Replace 'foo.size() > 0' pattern with !foo.empty().Stephen Kelly2015-01-181-2/+2
|
* Merge topic 'drop-ancient-workarounds'Brad King2015-01-121-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0f7bdd61 Remove VS 6 special case. 5e92c826 Remove some obsolete stuff. 15e42bb2 cmStandardIncludes: Remove obsolete cmOStringStream. 931e055d Port all cmOStringStream to std::ostringstream. f194a009 Remove unused cmIStringStream class. 3ec1bb15 cmStandardIncludes: Remove std namespace hack. bb3bce70 cmStandardIncludes: Remove ANSI_FOR_SCOPE hack. 28fa4923 cmStandardIncludes: Remove iostreams workaround for obsolete Compaq compiler. 837a8a63 cmStandardIncludes: Drop Comeau-related workaround. 4030ddfd Remove Borland-related undef. 17d6a6fd cmStandardIncludes: Remove comment about Borland. 26fb5011 Drop SGI as a CMake host compiler.
| * Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-2/+2
| | | | | | | | All compilers hosting CMake support the std class.
* | Use insert instead of a loop in some cases.Stephen Kelly2015-01-111-5/+1
|/ | | | | | Limit this change to inserting into a vector from a vector. A follow up change can use insert for inserting into a set.
* Remove extra semicolons from C++ code.Stephen Kelly2014-04-031-2/+2
| | | | | Clang based tools running over the code complain about these, but clang has a fixit for removing them.
* Remove some c_str() calls.Stephen Kelly2014-03-111-6/+6
| | | | | | 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
|
* Drop builtin command documentationBrad King2013-10-161-18/+0
| | | | | Drop all GetTerseDocumentation and GetFullDocumentation methods from commands. The command documentation is now in Help/command/*.rst files.
* Fix spelling and typos (non-binary)Andreas Mohr2013-05-071-1/+1
|
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-10/+10
| | | | | | | | | | | | | | | | | 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-5/+5
| | | | | Use const_cast for the special case in cmFindBase where GetFullDocumentation calls GenerateDocumentation.
* CPack Documentation extraction from CMake script begins to workEric NOULARD2012-01-221-0/+11
| | | | | | | | | | - Enhance extract doc parser. Seems robust now. The legacy module documentation parser works as before ignoring the new markup. - Proof of concept for CPack (generic), CPack RPM and CPack Deb generator for macro and variables. Try cpack --help-command and cpack --help-variables
* Remove old false positive avoidance codeBen Boeckel2010-09-171-4/+0
| | | | | | | | | | | | From email explaining existence in the first place: This is from before when the used checks throwing false positives about unused due to changing the definition without checking whether it *had* a value to begin with and me not realizing they were false positives. I was thinking that it was warning from ARGC et. al. not being used since the previous macro or function call and the new value warning about overwriting the old value.
* Mark ARGC, ARGV*, and ARGN as usedBen Boeckel2010-09-151-0/+8
|
* 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: Better policies for functions and macrosBrad King2009-01-221-0/+8
| | | | | | | This teaches functions and macros to use policies recorded at creation time when they are invoked. It restores the policies as a weak policy stack entry so that any policies set by a function escape to its caller as before.
* ENH: Enforce logical blocks in functions/macrosBrad King2009-01-211-0/+2
| | | | | This teaches function() and macro() to enforce matching logical blocks inside the recorded bodies. This makes the error message more specific.