summaryrefslogtreecommitdiffstats
path: root/Source/cmMacroCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Remove temporary allocations in cmMacroHelper::InvokeInitialPass.Milian Wolff2016-01-201-9/+7
| | | | | | | | This code used to convert std::string's to raw C strings only to put that back into a std::string. This patch thus removes ~70k temporary allocations when running the CMake daemon on KDevelop. This hotspot was found with heaptrack.
* cmAlgorithms: Rename cmRange to cmMakeRange.Stephen Kelly2015-07-221-1/+1
|
* cmMakefile: Remove special handling of MACROS property.Stephen Kelly2015-07-191-1/+1
|
* cmListFile: Remove FilePath member from cmListFileContext.Stephen Kelly2015-07-061-1/+0
| | | | | There is no need to store the FilePath for every function, as it is known by other means.
* 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-5/+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.
* cmMacroCommand: Store the FilePath when creating the prototype.Stephen Kelly2015-06-211-4/+1
| | | | Instead of setting it each time the macro is invoked.
* cmMakefile: Create a unified raii for macro scopes.Stephen Kelly2015-06-041-8/+3
|
* 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.