summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.h
Commit message (Collapse)AuthorAgeFilesLines
* cmFunctionBlocker: Move check for matching argsRegina Pfeifer2019-07-301-2/+1
|
* cmMakefile: Add OnExecuteCommand callbackRegina Pfeifer2019-07-301-0/+6
| | | | | In cmCTestScriptHandler, port away from cmFunctionBlocker and update the elapsed time with the new callback instead.
* Merge topic 'cmStringAlgorithms'Kyle Edwards2019-07-301-0/+1
|\ | | | | | | | | | | | | f71f7ce3f0 cmStringAlgorithms: Move string functions to the new cmStringAlgorithms.h Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3618
| * cmStringAlgorithms: Move string functions to the new cmStringAlgorithms.hSebastian Holtermann2019-07-291-0/+1
| | | | | | | | | | This adds the `cmStringAlgorithms.h` header and moves all string functions from `cmAlgorithms.h` to `cmStringAlgorithms.h`.
* | cmMakefile: Keep function blockers in a stackRegina Pfeifer2019-07-261-2/+4
|/ | | | Highlight the fact that we only ever operate on the top element.
* cmMakefile: Let AddDefinition accept a value as cm::string_viewSebastian Holtermann2019-07-241-2/+4
| | | | | | | | | | | | | | | | This changes `cmMakefile::AddDefinition` to take a `cm::string_view` as value argument instead of a `const char *`. Benefits are: - `std::string` can be passed to `cmMakefile::AddDefinition` directly without the `c_str()` plus string length recomputation fallback. - Lengths of literals passed to `cmMakefile::AddDefinition` can be computed at compile time. In various sources uses of `cmMakefile::AddDefinition` are adapted to avoid `std::string::c_str` calls and the `std::string` is passed directly. Uses of `cmMakefile::AddDefinition`, where a `nullptr` `const char*` might be passed to `cmMakefile::AddDefinition` are extended with `nullptr` checks.
* cmMakefile: Simplify and rename AddDefinitionBoolSebastian Holtermann2019-07-241-5/+4
| | | | | | | This simplifies the `cmMakefile::AddDefinition` method with bool value overload to call the string based `cmMakefile::AddDefinition` method with either an "ON" or "OFF" string. Also the method is renamed to `cmMakefile::AddDefinitionBool`
* Merge topic 'command-final-action'Brad King2019-07-191-3/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 732dd344b9 cmCommand: remove FinalPass from interface fbee46e262 cmVariableWatchCommand: Port away from FinalPass 360d415592 cmLoadCommandCommand: Port away from FinalPass 316e40baec cmInstallProgramsCommand: Port away from FinalPass 7bc88b9165 cmInstallFilesCommand: Port away from FinalPass 6a1a3763ee cmFLTKWrapUICommand: Port away from FinalPass 20169f0b8d cmExportLibraryDependenciesCommand: Port away from FinalPass a74dad3bd3 cmMakefile: decouple FinalAction from cmCommand ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3562
| * cmMakefile: decouple FinalAction from cmCommandDaniel Pfeifer2019-07-181-3/+10
| |
* | cmMakefile: Modernize AddFunctionBlocker method to accept a std::unique_ptrSebastian Holtermann2019-07-171-3/+3
|/
* modernize: manage cmCommand instances using unique_ptr.Marc Chevrier2019-07-141-1/+1
|
* IWYU: Fix handling of <memory> standard headerBrad King2019-07-101-1/+1
| | | | | | | | An old workaround for `std::allocator_traits<>::value_type` lints from IWYU on `std::vector<>` usage breaks IWYU's handling of `<memory>`. Convert the workaround to use the same approach we already use for a workaround of `std::__decay_and_strip<>::::__type` lints. Then update the `<memory>` inclusions to follow the now-correct IWYU lints.
* cmMakefile: Define cmTargetMap type in cmMakefile instead of cmTargetSebastian Holtermann2019-05-231-9/+8
| | | | | | | | The `cmTargetMap` type is only used in the context of `cmMakefile`. Therefore it is the most appropriate place to declare it. This moves the `cmTarget.h/cmTargets` type definition to `cmMakefile::cmTargetMap`.
* Support job pools in custom commands and targetsRosen Matev2019-05-141-5/+5
| | | | | | | | | | Provide a way for custom commands and targets to set the pool variable of the ninja build statement. Setting `JOB_POOL` is not compatible with `USES_TERMINAL`, which implies the `console` pool. The option is silently ignored with other generators. Closes: #18483
* Fix invalid ///! doxygen comment line startsSebastian Holtermann2019-03-311-8/+8
| | | | | In various places `///!` was used to start a comment line. This is not valid Doygen syntax. This patch replaces `///!` comment starts with `//!`.
* cmMakefile::ConfigureFile: Accept `std::string` parametersVitaly Stakhovsky2019-02-191-2/+2
|
* Delete some default constructors and assignment operatorsAlbert Astals Cid2019-02-151-0/+9
| | | | | | They are unused, but if someone used them they would lead to problems since they would copy the internal raw pointers and the destructor would cause double delete
* cmake: Progress functions use `std::string` paramVitaly Stakhovsky2019-02-111-1/+1
|
* cmMakefile::GetRequiredDefinition: return const std::string&Vitaly Stakhovsky2019-02-071-1/+1
|
* clang-tidy: Use `= delete`Regina Pfeifer2019-01-291-3/+7
|
* cmMakefile: Impose maximum recursion limitKyle Edwards2019-01-231-0/+4
| | | | | | | | | In order to keep infinitely-recursive scripts from causing a stack overflow in the CMake executable, CMake now imposes a maximum recursion limit before issuing an error message. The limit can be adjusted at runtime with CMAKE_MAXIMUM_RECURSION_DEPTH. Fixes: #18694
* cmMakefile: GetModulesFile() accepts std::string paramVitaly Stakhovsky2019-01-211-2/+2
|
* cmMakefile::ReadListFile() accepts std::string argumentVitaly Stakhovsky2019-01-171-4/+3
| | | | Same for cmMakefile::ReadDependentFile(); some cleanup
* Factor out enum MessageType into dedicated headerBruno Manganelli2019-01-161-10/+14
| | | | Reduce the number of files relying on `cmake.h`.
* cmake: Enable --warn-uninitialized inside string(CONFIGURE) and configure_fileArtur Ryt2018-12-291-1/+1
| | | | Fixes: #18489
* cmMakefile: Move uninitialized vars logic into MaybeWarnUninitialized()Artur Ryt2018-12-281-0/+2
|
* cmMakefile: move common logic to IsProjectFile functionArtur Ryt2018-12-281-0/+1
|
* find_package(): Add policy to remove the FindQt moduleKyle Edwards2018-11-141-1/+7
| | | | | | | | Removing FindQt.cmake gives Qt upstream a path forward to export its own QtConfig.cmake files which can be found by find_package() without having to explicitly specify CONFIG. Projects that still want to use Qt3/4 can call find_package(Qt[34]), include(FindQt), or add FindQt.cmake to their CMAKE_MODULE_PATH.
* cmMakefile: Rename SuppressWatches to SuppressSideEffectsR2RT2018-11-051-1/+1
|
* link_directories(): enhance capabilitiesMarc Chevrier2018-09-251-1/+1
|
* LINK_DIRECTORIES: Add new properties and commandsMarc Chevrier2018-09-251-0/+3
| | | | | | | | | | | | 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
* Merge topic 'getsafedef-stdstring'Brad King2018-09-181-1/+2
|\ | | | | | | | | | | | | f4ff60a803 cmMakefile: Make GetSafeDefinition return std::string const& Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2350
| * cmMakefile: Make GetSafeDefinition return std::string const&Vitaly Stakhovsky2018-09-181-1/+2
| |
* | target_link_libraries: Allow use with targets in other directoriesBrad King2018-09-121-0/+10
|/ | | | | | | | | | | | | | | | | | | | | Previously the command did not allow naming targets on the LHS that were not created in the calling directory. Lift this restriction to enable more flexible use by projects. Targets named on the RHS will need to be looked up during generation in the scope of the call site rather than the scope of the LHS target. Introduce an internal syntax in `[INTERFACE_]LINK_LIBRARIES` properties to specify target names that need to be looked up in a directory other than that containing the target on which the property is set. Add minimal documentation of the syntax to help users that encounter it. Unfortunately CMake previously did allow such calls in the case that only `INTERFACE` libraries are specified, but those libraries would be looked up in the target's directory rather than the caller's. Add policy `CMP0079` to enable the new behavior with new lookup scope in a compatible way. Fixes: #17943
* cmMakefile: Make GetRequiredDefinition return std::stringVitaly Stakhovsky2018-09-051-1/+1
| | | | | | | In all cases the return value is converted to std::string anyway. Also remove unnecessary `c_str()` calls in arguments to `GetRequiredDefinition`.
* cmMakefile: return directories as const std::string&Vitaly Stakhovsky2018-08-271-2/+2
|
* LINK_OPTIONS: Add new family of propertiesMarc Chevrier2018-06-061-0/+3
| | | | | | | | | | | | | | 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 C++ coding style using clang-format-6.0Kitware Robot2018-06-011-3/+6
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * 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.
* cmake: Add options for parallel builds to --build modeFlorian Maushart2018-05-251-1/+2
| | | | | | | While we already support `cmake --build . -- -j`, the options after `--` are specific to the native build tool. Add new options `--parallel [<N>]` and `-j [<N>]` to abstract this and map to the proper option for the native build tool.
* cmMakefile: Convert private helpers to file static functionsVitaly Stakhovsky2018-05-011-3/+0
| | | | | | The two-argument forms of `AddDefineFlag` and `RemoveDefineFlag` need no access to `cmMakefile` class members. They are used only within the implementation file.
* cmMakefile: Improve ExpandVariablesInString return typeVitaly Stakhovsky2018-05-011-6/+5
| | | | | Return `std::string const&` instead of a `const char*` that points into a string anyway. Update call sites accordingly.
* add_compile_definitions: add new commandMarc Chevrier2018-04-201-0/+1
| | | | | | | This command manages preprocessor definitions at directory level and supports generator expressions. Fixes: #15374
* cmake_policy: Add undocumented PARENT_SCOPE option to GETBrad King2018-04-181-1/+2
| | | | | | Policies affecting the behavior of CMake-provided macros and functions need to be able to get the policy setting as of the call site rather than the definition site. Add an undocumented option to do this.
* Features: Add infrastructure for C++ 20 language standardBrad King2018-03-271-1/+1
| | | | Issue: #17849
* Merge topic 'policy-version-range'Craig Scott2018-03-221-1/+2
|\ | | | | | | | | | | | | | | | | | | 45408b5ea1 cmake_minimum_required: Optionally set policies with version range 6a41aa2abd cmPolicies: Split parsing and impl of ApplyPolicyVersion 1d00ed7cf7 cmPolicies: Drop unnecessary check from ApplyPolicyVersion 0df559832b cmPolicies: Pass policy version as std::string Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1864
| * cmake_minimum_required: Optionally set policies with version rangeBrad King2018-03-211-1/+2
| | | | | | | | | | | | | | | | Teach `cmake_minimum_required` and `cmake_policy(VERSION)` to support a version range of the form `<min>[...<max>]`. Define this to mean that version `<min>` is required, but known policies up to those introduced by `<max>` will be set to `NEW`. This will allow projects to easily specify a range of versions for which they have been updated.
| * cmPolicies: Pass policy version as std::stringBrad King2018-03-161-1/+1
| |
* | find_package: Use PackageName_ROOT variables as search prefixesBrad King2018-03-161-3/+6
|/ | | | | | | | | | | | | | | | | | | This feature was originally added by commit v3.9.0-rc1~71^2~2 (find_*: Add a new PackageRoot search path group, 2017-05-03) and documented by commit v3.9.0-rc1~71^2 (find_*: Add docs for PackageRoot search path group, 2017-05-03). However, we had to disable the feature and remove the documentation in commit v3.9.1~2^2 (find_*: Disable the PACKAGE_ROOT search path group for CMake 3.9, 2017-08-08) due to breaking projects that used `PackageName_ROOT` variables themselves. Add policy `CMP0074` to restore the `PackageName_ROOT` variable behavior in a compatible way. Also revise the stack of root paths to store the paths themselves rather than the package names. This way the policy can be considered at the `find_package` call site instead of individual `find_` calls inside a find module. Co-Author: Chuck Atkins <chuck.atkins@kitware.com> Issue: #17144
* cmMakefile: Improve performance of GetSource for known filesFrank Winklmeier2018-02-231-0/+3
| | | | | | | Store "Known" files separately in KnownFileSearchIndex. This avoids creating the rather expensive cmSourceFileLocation object for source files that are already known. For large projects this results in a factor 3-4 speedup of cmGlobalGenerator::Compute().
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-9/+10
| | | | | | | | | | * 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.