summaryrefslogtreecommitdiffstats
path: root/Source/cmMacroCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Port cmCommand consumers to cmState.Stephen Kelly2015-04-151-3/+2
|
* Include cmAlgorithms where it is used.Stephen Kelly2015-03-101-0/+1
|
* cmMakefile: Store macro list in a vector not in a map.Stephen Kelly2015-02-211-9/+1
| | | | | The signature was computed (incorrectly) and stored as the map value, but never used. Remove it now.
* cmMacroCommand: Manipulate target string directly.Stephen Kelly2015-02-111-14/+10
| | | | | Avoid copying a string from the source, manipulating it, and then copying it back. Manipulate it in place instead.
* cmMacroCommand: Move computation of ARGV%n names out of double loop.Stephen Kelly2015-02-111-4/+9
|
* cmMacroCommand: Move ARGV replacement out of condition.Stephen Kelly2015-02-111-2/+1
|
* cmMacroCommand: Remove condition around ARGN replacement.Stephen Kelly2015-02-111-5/+1
| | | | | There is none for ARGC replacement, so no reason to conditionalize the replacement. The computation is already done.
* cmMacroCommand: Declare tmps in the scope that it's used.Stephen Kelly2015-02-111-3/+1
| | | | | We don't particularly need to reuse the string memory here, and this pattern is not common in CMake.
* cmMacroCommand: Declare arg in the scope that it is used.Stephen Kelly2015-02-111-1/+2
| | | | | | It can make sense to declare objects outside of loops if the size required by the object can grow (eg std::string when using getline), but that is not the case here.
* cmMacroCommand: Inline variable computation.Stephen Kelly2015-02-111-5/+1
|
* cmMacroCommand: Compute variables outside of two loops.Stephen Kelly2015-02-111-6/+12
| | | | | Avoid computing them from scratch for each argument of each function.
* cmMacroCommand: Remove intermediate arg variables.Stephen Kelly2015-02-111-7/+2
|
* cmMacroCommand: Remove condition around ARGN computation.Stephen Kelly2015-02-111-4/+1
| | | | | An empty string is appended if the condition is false, which is ok for this commit.
* cmMacroCommand: Remove conditional append of semicolon.Stephen Kelly2015-02-111-8/+0
| | | | The conditions are never true.
* cmMacroCommand: Declare arg variables where used and initialized.Stephen Kelly2015-02-111-21/+9
| | | | | Make the initialization by population with the expanded* content unconditional.
* cmMacroCommand: Join the args strings outside of the loops.Stephen Kelly2015-02-111-4/+6
| | | | | This means that we compute the strings even if not used in the macro but this shouldn't be expensive and it simplifies the code.
* Convert loops to cmJoin algorithm with cmRange.Stephen Kelly2015-02-111-6/+1
|
* Replace common loop pattern with cmJoinStephen Kelly2015-02-111-8/+1
|
* Convert loops populating maybe-empty content into the common pattern.Stephen Kelly2015-02-111-9/+14
|
* cmMacroCommand: Remove counting variable.Stephen Kelly2015-02-111-9/+4
| | | | Start iteration at correct starting point directly.
* cmMacroCommand: Execute loop only if it has an effect.Stephen Kelly2015-02-111-9/+12
|
* cmMacroCommand: Extract iteration starting point.Stephen Kelly2015-02-111-2/+3
|
* cmMacroCommand: Replace a loop with cmJoin.Stephen Kelly2015-02-111-3/+3
|
* Replace foo.size() pattern with !foo.empty().Stephen Kelly2015-01-181-1/+1
|
* Replace 'foo.size() > 0' pattern with !foo.empty().Stephen Kelly2015-01-181-2/+2
|
* Merge topic 'drop-ancient-workarounds'Brad King2015-01-121-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | 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-3/+3
| | | | | | 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
|
* macro: Do not substitute for placeholders in bracket argumentsBrad King2013-10-301-0/+7
| | | | | Fix the macro command implementation to avoid substituting macro placeholders in bracket arguments recorded inside the macro block.
* macro: Add extra indentation to placeholder substitution codeBrad King2013-10-301-51/+51
| | | | | The next commit will make this block conditional so pre-indent it to clarify the simplicity of the change.
* 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.
* cmListFileArgument: Generalize 'Quoted' bool to 'Delimeter' enumBrad King2013-08-081-1/+1
| | | | | | Replace the boolean value that indicates whether an argument is unquoted or quoted with a generalized enumeration of possible argument types. For now "Quoted" and "Unquoted" remain the only types.
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-6/+6
| | | | | | | | | | | | | | | | | 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
* For macros make sure the FilePath points to a valid pointer in the args.Bill Hoffman2010-09-011-2/+10
|
* 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/+4
| | | | | This teaches function() and macro() to enforce matching logical blocks inside the recorded bodies. This makes the error message more specific.
* ENH: Better handling of mismatched blocksBrad King2009-01-211-1/+1
| | | | | | | | | | | | | | | | If a logical block terminates with mismatching arguments we previously failed to remove the function blocker but replayed the commands anyway, which led to cases in which we failed to report the mismatch (return shortly after the ending command). The recent refactoring of function blocker deletion changed this behavior to produce an error on the ending line by not blocking the command. Furthermore, the function blocker would stay in place and complain at the end of every equal-level block of the same type. This teaches CMake to treat the begin/end commands (if/endif, etc.) as correct and just warns when the arguments mismatch. The change allows cases in which CMake 2.6.2 silently ignored a mismatch to run as before but with a warning.
* ENH: Better error message for unclosed blocksBrad King2009-01-211-11/+0
| | | | | | This centralizes construction of the error message for an unclosed logical block (if, foreach, etc.). We record the line at which each block is opened so it can be reported in the error message.
* ENH: Improve context for errors in macrosBrad King2008-09-241-29/+2
| | | | | | We now properly report the source location of command arguments inside macros instead of using the macro invocation site. No information is lost because full call-stack information is already reported.
* ENH: New format for warning and error messagesBrad King2008-03-071-17/+5
| | | | | | | | | | | | | - Add cmMakefile methods IssueError and IssueWarning - Maintain an explicit call stack in cmMakefile - Include context/call-stack info in messages - Nested errors now unwind the call stack - Use new mechanism for policy warnings and errors - Improve policy error message - Include cmExecutionStatus pointer in call stack so that errors deeper in the C++ stack under a command invocation will become errors for the command
* ENH: make CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS the default and remove the ↵Bill Hoffman2008-02-291-4/+4
| | | | property. If any value is specified in an endif, endforeach, endwhile, etc then make sure it matches the start string. If no values are given then it is no longer an error.
* ENH: add return and break support to cmake, also change basic command ↵Ken Martin2008-01-231-6/+22
| | | | invocation signature to be able to return extra informaiton via the cmExecutionStatus class
* ENH: make properties a bit more formal with documentation and chainingKen Martin2006-12-071-1/+2
|
* ENH: fix warningBill Hoffman2006-12-011-1/+0
|