summaryrefslogtreecommitdiffstats
path: root/Source/cmOptionCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Refactor: Use cmStrCat to construct error stringsAsit Dhal2019-09-181-9/+7
| | | | | Replace string construction using std::stringstream with cmStrCat and cmWrap.
* Source sweep: Use cmStrCat for string concatenationSebastian Holtermann2019-08-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)`
* cmCommand refactor: cmOptionCommandGabor Bencze2019-08-201-13/+13
|
* Source sweep: Use cmIsOn instead of cmSystemTools::IsOnSebastian Holtermann2019-08-171-2/+1
| | | | | | | | | This replaces invocations of - `cmSystemTools::IsInternallyOn` with `cmIsInternallyOn` - `cmSystemTools::IsNOTFOUND` with `cmIsNOTFOUND` - `cmSystemTools::IsOn` with `cmIsOn` - `cmSystemTools::IsOff` with `cmIsOff`
* cmStringAlgorithms: Move string functions to the new cmStringAlgorithms.hSebastian Holtermann2019-07-291-1/+1
| | | | | This adds the `cmStringAlgorithms.h` header and moves all string functions from `cmAlgorithms.h` to `cmStringAlgorithms.h`.
* Factor out enum MessageType into dedicated headerBruno Manganelli2019-01-161-2/+2
| | | | Reduce the number of files relying on `cmake.h`.
* Merge topic 'definitions-get'Brad King2018-09-071-2/+2
|\ | | | | | | | | | | | | 437d0c16c7 cmStateSnapshot::GetDefinition(): Return std::string const* Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2356
| * cmStateSnapshot::GetDefinition(): Return std::string const*Vitaly Stakhovsky2018-09-061-2/+2
| | | | | | | | Expose std::string type used internally in cmDefinitions instead of const char*
* | Remove unnecessary c_str() callsVitaly Stakhovsky2018-09-051-1/+1
|/ | | | Use the new IsOn(),IsOff() overloads.
* option: No CMP077 warnings when both cache and local variable existsRobert Maynard2018-07-101-26/+36
| | | | | | Previously we would warn when the local and cache version of a variable exists, but this use case doesn't need a warning as it maintains backwards compatibility.
* option: respect existing normal variableRobert Maynard2018-07-091-9/+43
| | | | Add policy CMP0077 to change this behavior in a compatible way.
* cmOption: Remove VTK 4.0 workaroundsRobert Maynard2018-06-211-13/+1
| | | | | CMake has no reason to have special logic to fix bad logic within VTK 4.0.
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-2/+0
|
* Include necessary headers in commandsDaniel Pfeifer2016-10-261-0/+7
|
* Separate compilation for commands included in cmBootstrapCommands2Daniel Pfeifer2016-10-211-0/+3
|
* cmState: Move CacheEntryType enum to separate namespaceStephen Kelly2016-10-191-2/+2
| | | | Port dependent code to the change.
* 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.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-23/+16
| | | | | | | | | | | | | 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.
* cmState: Move CacheEntryType enum from cmCacheManager.Stephen Kelly2015-04-131-2/+2
|
* Port to cmState.Stephen Kelly2015-04-131-4/+4
|
* cmCacheManager: Port consumers to non-iterator API.Stephen Kelly2015-04-081-6/+6
| | | | | This simplifies reasoning about the follow-up commit which ports away from cmCacheManager to a class with the same method names.
* Revert topic 'refactor-cache-api'Brad King2015-04-071-6/+6
| | | | | | This topic was never tested without some follow-up commits. The GetCacheEntryValue API returns a pointer to memory freed on return. It will have to be revised along with the rest of the original topic.
* cmCacheManager: Port consumers to non-iterator API.Stephen Kelly2015-04-061-6/+6
| | | | | This simplifies reasoning about the follow-up commit which ports away from cmCacheManager to a class with the same method names.
* Replace common loop pattern with cmJoinStephen Kelly2015-02-111-5/+1
|
* Remove some c_str() calls.Stephen Kelly2014-03-111-2/+2
| | | | | | 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: Use strings for cache iterator valuesBen Boeckel2014-03-081-4/+1
|
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-2/+2
| | | | | | | | | | | | | | | | | 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/ \+$//'
* Remove CMake Policy CMP0015 until it is revisedBrad King2009-10-081-1/+0
| | | | | | | | | | | | | | | | | | | | We revert commit "Create CMake Policy CMP0015 to fix set(CACHE)" because the NEW behavior of the policy breaks a valid use case: # CMakeLists.txt option(BUILD_SHARED_LIBS "..." ON) add_library(mylib ...) set(BUILD_SHARED_LIBS OFF) # we want only mylib to be shared add_subdirectory(ThirdParty) # ThirdParty/CMakeLists.txt option(BUILD_SHARED_LIBS "..." ON) # uh, oh, with NEW behavior this dir uses shared libs!!! We'll re-introduce the policy later with a different change in behavior to resolve the motivating case, which was more subtle but less common. See issue #9008.
* 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.
* Fix option() interpretation of non-boolean valuesBrad King2009-09-111-1/+2
| | | | | | The commit "Remove barely-used cmMakefile::AddCacheDefinition" broke option() calls that pass a non-boolean default value. We restore the old behavior by always coercing the value to 'ON' or 'OFF'.
* Create CMake Policy CMP0015 to fix set(CACHE)Brad King2009-09-101-0/+1
| | | | | | | | The set(CACHE) and option() commands should always expose the cache value. Previously we failed to expose the value when it was already set if a local variable definition hid it. When set to NEW, this policy tells the commands to always remove the local variable definition to expose the cache value. See issue #9008.
* Remove barely-used cmMakefile::AddCacheDefinitionBrad King2009-09-101-4/+2
| | | | | | | | The boolean overload of this method was used only to implement option(). We re-implement option() in terms of the main method and removes the now-unused signature. This removes some duplicate code that had already fallen behind on changes (it was not removing the local definition instead of setting it).
* 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: fix line lengthKen Martin2006-05-121-3/+4
|
* STYLE: some m_ to this-> cleanupKen Martin2006-03-151-3/+3
|
* BUG: fix for 282Bill Hoffman2004-04-151-0/+1
|
* ERR: Fix problems with OPTION and -D on command line. Fix Bug #408 - Using ↵Andy Cedilnik2003-12-291-9/+18
| | | | -D without a type does not always work
* ENH: Added reference to Copyright.txt. Removed old reference to ITK ↵Brad King2002-10-231-3/+3
| | | | copyright. Changed program name to CMake instead of Insight in source file header. Also removed tabs.
* WAR: remove warnings for .NET compilerBill Hoffman2002-04-251-1/+1
|
* ENH: backwards compatible for VTK 4.0, add cmake version requiresBill Hoffman2002-04-171-3/+24
|
* ENH: add error checking for option commands with too many argumentsBill Hoffman2002-03-111-1/+1
|
* ENH: expand variables in arguments before the commands get themBill Hoffman2002-03-051-1/+0
|
* ENH:Updated copyrightWill Schroeder2002-01-211-29/+5
|
* ENH: do not write over existing cache values even doc strings to avoid ↵Berk Geveci2001-11-271-6/+0
| | | | changing the cache file
* ENH: change InitialPass to take a const reference to the argument string, to ↵Bill Hoffman2001-09-201-1/+1
| | | | avoid changes to the file cache
* Allow option value to be expanded (thus, we can use the value of another ↵Sebastien Barre2001-08-191-3/+4
| | | | option as default)
* ENH: big change, only allow commands access to the cache via the cmMakefile ↵Bill Hoffman2001-08-081-9/+6
| | | | class and GetDefinition, also the cmMakefile is the only way for commands to add to the cache. Also, some changes to configure.in that check for for scoping
* ENH: rename Invoke to InitialPassBill Hoffman2001-06-061-1/+1
|
* ENH: move testing stuff to cmake from configure, good bye dashboard... :)Bill Hoffman2001-05-041-2/+7
|
* ENH:New copyrightWill Schroeder2001-04-271-3/+28
|