summaryrefslogtreecommitdiffstats
path: root/Source/cmState.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Ninja: Add multi-config variantKyle Edwards2019-12-131-0/+10
| | | | Co-Authored-by: vector-of-bool <vectorofbool@gmail.com>
* CUDA: Add cuda meta-features (e.g. ``cuda_std_11``) supportRobert Maynard2019-12-101-0/+3
|
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-1/+2
| | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* cmState: Avoid lowering command name twiceDaniel Eiband2019-09-211-1/+1
| | | | | The given command given to GetCommand is already lower case so we can use GetCommandByExactName directly.
* cmstd: Modernize CMake system headersMarc Chevrier2019-09-201-1/+1
| | | | | | | | | | | | | | Provide a standardized way to handle the C++ "standard" headers customized to be used with current CMake C++ standard constraints. Offer under directory `cm` headers which can be used as direct replacements of the standard ones. For example: #include <cm/string_view> can be used safely for CMake development in place of the `<string_view>` standard header. Fixes: #19491
* clang-tidy: modernize-deprecated-headersRegina Pfeifer2019-09-161-3/+3
|
* clang-tidy: modernize-use-autoRegina Pfeifer2019-09-101-6/+4
| | | | | | Set the MinTypeNameLength option to an impossibly high value in order to limit the diagnostics to iterators. Leave new expressions and cast expressions for later.
* clang-tidy: modernize-return-braced-init-listRegina Pfeifer2019-09-061-9/+9
|
* cmCommand refactor: remove unused AddDisallowedCommand overloadGabor Bencze2019-08-261-11/+0
|
* Merge topic 'free-disallowed'Brad King2019-08-211-6/+42
|\ | | | | | | | | | | | | | | c55fb044a9 cmBuildNameCommand: Implement as free function 86bf1eef75 cmState: Support free function disallowed commands Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3688
| * cmBuildNameCommand: Implement as free functionRegina Pfeifer2019-08-161-0/+1
| |
| * cmState: Support free function disallowed commandsRegina Pfeifer2019-08-131-6/+41
| |
* | Source sweep: Use cmIsOn instead of cmSystemTools::IsOnSebastian Holtermann2019-08-171-1/+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`.
* cmDefinitions: Remove const char* based Set methodSebastian Holtermann2019-07-241-2/+2
| | | | | | | - Removes `cmDefinitions::Set` method overload that takes a `const char*` value argument. - Updates calls to `cmDefinitions::Set` to use the `cm::string_view` based version instead.
* cmState: Support BuiltinCommands as free functionsRegina Pfeifer2019-07-221-0/+17
|
* cmState: Add scripted commands by valueRegina Pfeifer2019-07-211-3/+2
|
* cmUnexpectedCommand: Replace with lambda expressionRegina Pfeifer2019-07-211-5/+21
|
* cmState: Hold commands by valueRegina Pfeifer2019-07-211-26/+10
|
* modernize: manage cmCommand instances using unique_ptr.Marc Chevrier2019-07-141-27/+25
|
* Introduce memory management helper: cm_memory.hxxMarc Chevrier2019-07-141-0/+2
|
* modermize: replace some raw pointers w/ `unique_ptr`Alex Turbov2019-06-241-4/+2
|
* cmPropertyMap: Make std::map container privateSebastian Holtermann2019-06-081-2/+2
|
* CMake: Provide language level compile features listsRobert Maynard2019-03-201-0/+19
| | | | | Now CMake stores what compile features are associated with each language level and exposes them as global properties.
* set: warn if CACHE type is not recognizedTaylor Holberton2019-01-301-2/+11
|
* Avoid -Wstring-plus-int warningBrad King2019-01-231-2/+2
| | | | | | | | In `cmState::GetGlobalProperty` we use a macro to produce a string of the form ";a;b;c" and want to return "a;b;c" by skipping the leading ";". Switch from pointer arithmetic to indexing+addressing to silence the "warning: adding 'int' to a string does not append to the string" diagnostic from Clang.
* Merge topic 'GHS_updates'Brad King2019-01-181-0/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 21ab58d3f8 GHS: Update test suite 72e0c115b7 GHS: Add Compiler ID detection 436cc5e991 GHS: try_compile() now uses GHS platform variables 4a1ec0de3d GHS: Fix toolset selection 1a66acdef2 GHS: Append ".gpj" to target name when generating build command 0c9e47d7cd GHS: Integrity Application updates 8044318431 GHS: Add support for some of the source file properties 73092b2213 GHS: Add support for object libraries ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2231
| * GHS: try_compile() now uses GHS platform variablesFred Baksik2019-01-161-0/+10
| | | | | | | | | | | | | | -- Forward GHS platform variables to try_compile() CMAKE_TRY_COMPILE_PLATFORM_VARIABLES only worked for source signature try_compile() -- Update tests to no longer add GHS platform variables to try_compile() -- Avoid linker error in GhsMulti/GhsMultiCompilerOptions/CMakeLists.txt by building library
* | Properties: Add CMAKE_ROLE global propertyKyle Edwards2019-01-171-0/+37
|/ | | | | This property allows scripts to determine whether they're in project mode, script mode, find-package mode, CTest, or CPack.
* clang-tidy: Use default member initializationRegina Pfeifer2018-12-151-8/+0
|
* Using front() and back() instead of calculationsCengizhan Pasaoglu2018-11-061-4/+4
|
* Merge topic 'set_directory_properties-script-mode'Brad King2018-10-301-0/+10
|\ | | | | | | | | | | | | 50572d638b set_directory_properties: Restore in script mode Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2544
| * set_directory_properties: Restore in script modeBrad King2018-10-291-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Since commit v3.10.0-rc1~391^2~3 (Add directory property 'LABELS' and CMAKE_DIRECTORY_LABELS variable, 2017-06-23) this command was accidentally not allowed in script mode. It was dropped because `ctest -S` mode needs to start with CMake's normal script mode and then replace the `set_directory_properties` implementation. Restore the normal `set_directory_properties` in script mode and then add special logic to replace it in ctest. Also add a test case. Fixes: #18523
* | LINK_DIRECTORIES: Add new properties and commandsMarc Chevrier2018-09-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | These new capabilities enable to manage link directories Two new properties: * target properties: LINK_DIRECTORIES and INTERFACE_LINK_DIRECTORIES One new command * target_link_directories(): to populate target properties Fixes: #17215
* | LINK_OPTIONS: Add missing initialization actionsMarc Chevrier2018-09-171-0/+3
| |
* | cmState::GetInitializedCacheValue: Return as const std::string*Vitaly Stakhovsky2018-09-101-3/+3
| |
* | Merge topic 'gicv-stdstring'Brad King2018-09-101-1/+2
|\ \ | | | | | | | | | | | | | | | | | | 46855d000f cmCacheManager::GetInitializedCacheValue(): Return as const std::string* Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2357
| * | cmCacheManager::GetInitializedCacheValue(): Return as const std::string*Vitaly Stakhovsky2018-09-061-1/+2
| | | | | | | | | | | | Expose std::string type used internally instead of const char*
* | | cmStateSnapshot::GetDefinition(): Return std::string const*Vitaly Stakhovsky2018-09-061-2/+2
|/ / | | | | | | Expose std::string type used internally in cmDefinitions instead of const char*
* | Merge topic 'state-reset-glob'Brad King2018-08-241-0/+1
|\ \ | | | | | | | | | | | | | | | | | | 6f3b9e8b95 cmState: Clear GlobVerificationManager state on Reset Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2278
| * | cmState: Clear GlobVerificationManager state on ResetShane Parris2018-08-091-0/+1
| | | | | | | | | | | | | | | | | | It should not persist across multiple configure rounds. Fixes: #18208
* | | LINK_OPTIONS: Add new family of propertiesMarc Chevrier2018-06-061-0/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | This family enable to manage link flags Three new properties: * directory property: LINK_OPTIONS * target properties: LINK_OPTIONS and INTERFACE_LINK_OPTIONS Two new commands * add_link_options(): to populate directory property * target_link_options(): to populate target properties Fixes: #16543
* | Revise implementation of case-insensitive command namesFlorian Jacomme2018-05-221-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store both the as-written and lower-case command names and use the latter to avoid case-insensitive string comparisons. With this I obtain 2-6% speed increase (on Windows) for the configure step with no significant changes in memory usage. A case-insensitive comparison is a lot slower than just calling `==` because the operator will use things like memcmp, so prefer the latter. The `cmSystemTools::LowerCase` function allocates a new string each time it is called, so before this change we were allocating in: * cmMakefile::Configure two times for each function (to look for `cmake_minimum_required` and `project`) * cmMakefile::ExecuteCommand twice by function by calling cmState::GetCommand and copying the name Now we are only allocating once by function instead of four.
* | Add cmGlobVerificationManager class, integrate with cmake and cmStateShane Parris2018-03-291-0/+36
| |
* | Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-5/+5
| | | | | | | | | | | | | | | | | | | | * Change some functions to take `std::string` instead of `const char*` in the following classes: `cmMakeFile`, `cmake`, `cmCoreTryCompile`, `cmSystemTools`, `cmState`, `cmLocalGenerator` and a few others. * Greatly reduce using of `const char*` overloads for `cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`. * Remove many redundant `c_str()` conversions throughout the code.
* | cmCacheManager: Truncate values containing newlinesKyle Edwards2018-01-151-2/+2
|/ | | | Fixes #16098.
* Meta: modernize old-fashioned loops to range-based `for`.Pavel Solodovnikov2017-09-121-8/+4
| | | | | | Changes done via `clang-tidy` with some manual fine-tuning for the variable naming and `auto` type deduction where appropriate.
* Replace C-style castsDaniel Pfeifer2017-08-271-1/+1
|
* Use C++11 nullptrDaniel Pfeifer2017-08-241-7/+7
|
* Pass large types by const&, small types by valueDaniel Pfeifer2017-06-031-8/+8
|