summaryrefslogtreecommitdiff
path: root/Source/cmStringCommand.h
Commit message (Collapse)AuthorAgeFilesLines
* Modernize: Use #pragma once in all header filesKitware Robot2020-09-031-4/+1
| | | | | | | | | | | | | | | | #pragma once is a widely supported compiler pragma, even though it is not part of the C++ standard. Many of the issues keeping #pragma once from being standardized (distributed filesystems, build farms, hard links, etc.) do not apply to CMake - it is easy to build CMake on a single machine. CMake also does not install any header files which can be consumed by other projects (though cmCPluginAPI.h has been deliberately omitted from this conversion in case anyone is still using it.) Finally, #pragma once has been required to build CMake since at least August 2017 (7f29bbe6 enabled server mode unconditionally, which had been using #pragma once since September 2016 (b13d3e0d)). The fact that we now require C++11 filters out old compilers, and it is unlikely that there is a compiler which supports C++11 but does not support #pragma once.
* cmCommand refactor: cmStringCommandGabor Bencze2019-08-201-54/+3
|
* modernize: manage cmCommand instances using unique_ptr.Marc Chevrier2019-07-141-1/+6
|
* string: introduce `REPEAT` sub-commandAlex Turbov2019-04-151-0/+1
|
* string() Refactoring: creates an helper for REGEX REPLACEMarc Chevrier2018-04-161-23/+0
|
* string: Add JOIN subcommandAlex Turbov2018-02-161-0/+5
| | | | | This is just like CONCAT but accepts a glue string to put between each value. `JOIN ""` is equivalent to `CONCAT`.
* Use C++11 override instead of CM_OVERRIDEBrad King2017-09-151-2/+2
| | | | | | | | 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'
* IWYU: Mark cmConfigure.h with pragma: keepDaniel Pfeifer2017-08-261-1/+1
| | | | Also remove `#include "cmConfigure.h"` from most source files.
* Add PREPEND sub-command to string commandSylvain Joubert2017-08-111-0/+1
|
* cmCommand: remove unused methods from interface and all implementationsDaniel Pfeifer2017-05-111-5/+0
|
* cmCommand: remove IsScriptableDaniel Pfeifer2017-05-081-5/+0
|
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-1/+1
| | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* cmConfigure: Ensure separate include block in headersDaniel Pfeifer2017-04-111-0/+1
| | | | | | | | | | | Make sure that `#include <cmConfigure.h>` is followed by an empty line in header files. This is necessary to make sure that changing <> to "" does not affect the include ordering of clang-format. Automate with: git grep -l '#include <cmConfigure.h>' | grep -v '.cxx$' \ | xargs sed -i '/#include <cmConfigure.h>/ { N; N; s/\n\{1,2\}/\n\n/ }'
* Include necessary headers in commandsDaniel Pfeifer2016-10-261-4/+5
|
* Make cmCommand not inherit from cmObjectDaniel Pfeifer2016-10-231-2/+0
|
* 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.
* mark functions with CM_OVERRIDEDaniel Pfeifer2016-06-271-5/+5
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-13/+21
| | | | | | | | | | | | | 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.
* string: add APPEND subcommandDaniel Pfeifer2015-07-071-0/+1
|
* cmMakefile: store the number of last matches in a CMake varBen Boeckel2014-12-031-2/+0
| | | | | | | | | With PushScope and PopScope, keeping track of another bit of data for each scope isn't easy. Instead, store it as another CMake variable so it gets implicitly tracked along with everything else. This works in a revert of commit 7d674b5f0b28a610333644d417c2e8cb796cc9e4.
* Revert "ClearMatches: Only clear matches which were actually set" (#15261)Ben Boeckel2014-11-261-0/+2
| | | | | | | | | | | This reverts commit v3.1.0-rc1~557^2~2 (ClearMatches: Only clear matches which were actually set, 2014-03-12). The optimization did not track the match count in the same scope as the variables, allowing possible inconsistency. Resolve conflicts in Source/cmIfCommand.cxx, Source/cmMakefile.cxx, and Source/cmMakefile.h by moving the changes to the new location of the code involved.
* StringUuid: Implement new string(UUID) sub-command.Nils Gladitz2014-08-281-0/+1
|
* ClearMatches: Only clear matches which were actually setBen Boeckel2014-04-291-2/+0
| | | | | | | ClearMatches was clearing many variables which were never set in the first place. Instead, store how many matches were made last time and only clear those. It is moved to the cmMakefile class since it is a common utility used by multiple commands.
* Remove extra semicolons from C++ code.Stephen Kelly2014-04-031-1/+1
| | | | | Clang based tools running over the code complain about these, but clang has a fixit for removing them.
* cmStringCommand: Add GENEX_STRIP subcommand.Stephen Kelly2014-03-311-0/+1
| | | | Strip out any generator expressions in the input string.
* stringapi: Command namesBen Boeckel2014-03-081-1/+1
|
* string: Add CONCAT sub-commandBrad King2013-10-211-0/+1
| | | | | | Add a string(CONCAT) command to simply concatenate input arguments together. This will be useful for combining strings from different quoting syntaxes. Add a RunCMake.string test covering these cases.
* Drop builtin command documentationBrad King2013-10-161-130/+0
| | | | | Drop all GetTerseDocumentation and GetFullDocumentation methods from commands. The command documentation is now in Help/command/*.rst files.
* string: Add MAKE_C_IDENTIFIER subcommandStephen Kelly2013-05-211-1/+5
|
* string: Fix regex documentation of '^' and '$' (#14028)Brad King2013-03-191-2/+2
| | | | | | They match at the beginning and end of the input, not by line. Reported-by: Martin Perzl <martin.perzl@web.de>
* Documentation: Clarify a few subtletiesPetr Kmoch2013-03-121-0/+7
| | | | | | | | | | | | | | * Clarify accepted values of <LANG> suffix in CMAKE_COMPILER_IS_GNU<LANG>. * Clarify fact that target property GENERATOR_FILE_NAME usually cannot be used at configure time. * Clarify that enable_language() can only be used in global scope of top-level project using language. * State that enable_language(... OPTIONAL) currently doesn't work. * Document regular expression operator precedence.
* CMake: Stylistic changes and documentation tweaksDavid Cole2012-12-051-2/+2
| | | | ...for the contributed file and string TIMESTAMP sub-commands.
* CMake: Add TIMESTAMP subcommand to string and file commandsNils Gladitz2012-12-051-1/+29
|
* string: Clarify regex documentation of '-' behaviorBrad King2012-10-081-1/+2
| | | | | | Mention that it is only special inside brackets. Show an example. Suggested-by: Alan W. Irwin
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-3/+3
| | | | | | | | | | | | | | | | | 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-4/+4
| | | | | Use const_cast for the special case in cmFindBase where GetFullDocumentation calls GenerateDocumentation.
* Add string(MD5) and string(SHA*) commands to compute hashesBrad King2011-11-161-0/+5
| | | | | Provide a CMake-language binding to these cryptographic hashes. Add a string() command API for MD5, SHA1, SHA224, SHA256, SHA384, and SHA512.
* CMake: Update documentation of STRING(SUBSTRING) for length -1 (#10740)Rolf Eike Beer2011-05-271-1/+2
|
* Add a string(FIND) sub-command (#11795)Tim Hütz2011-02-151-0/+6
|
* Fix issue #9851 - only seed the random number generator on the first call to ↵David Cole2009-11-061-2/+3
| | | | STRING(RANDOM or if given the new RANDOM_SEED argument. Add test and documentation of new argument.
* 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.
* STYLE: add line breaks to the documentation for CMAKE_MATCH_(0..9),Alexander Neundorf2009-03-131-3/+4
| | | | | | otherwise one might miss this information Alex
* ENH: add return and break support to cmake, also change basic command ↵Ken Martin2008-01-231-1/+2
| | | | invocation signature to be able to return extra informaiton via the cmExecutionStatus class
* STYLE: Spelling fixes on documentationAmitha Perera2008-01-091-1/+1
|
* ENH: make commands lower case by defaultKen Martin2007-10-101-17/+17
|
* STYLE: add the | to the docsAlexander Neundorf2007-08-301-0/+1
| | | | Alex
* STYLE: add docs about the supported regexp characters and CMAKE_MATCH_(0..9)Alexander Neundorf2007-08-291-1/+14
| | | | Alex
* ENH: also store the group matches from IF( MATCHES) in CMAKE_MATCH_(0..9)Alexander Neundorf2007-08-291-2/+3
| | | | Alex
* COMP: header was missing...Alexander Neundorf2007-08-211-1/+8
| | | | Alex
* STYLE: fix documentation for STRING(REPLACE) #5536Alexander Neundorf2007-08-211-8/+4
| | | | Alex