summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
Commit message (Collapse)AuthorAgeFilesLines
* ALIAS targets: Non-global aliases must be propagated to sub-directoriesMarc Chevrier2020-07-111-0/+3
| | | | Fixes: #20942
* add_library/add_executable: allow local alias to imported targetsMarc Chevrier2020-06-021-3/+14
| | | | Fixes: #20641
* cmMakefile: add GetDefExpandList() that splits value into std::vectorVitaly Stakhovsky2020-05-301-4/+13
| | | | Combines cmMakefile:GetDefinition() and cmExpandList()
* cmTarget: Replace "perConfig" constructor boolean with enumBrad King2020-05-181-6/+6
|
* source_group: Support forward slashes in group hierarchyCraig Scott2020-05-101-4/+4
| | | Fixes: #18076
* Refactoring: Third-parties public headers are under cm3p prefixMarc Chevrier2020-05-071-2/+3
| | | | Fixes: #20666
* Merge topic 'cmprop-state'Brad King2020-05-011-4/+3
|\ | | | | | | | | | | | | e267c3fddf cmState::GetInitializedCacheValue: return cmProp Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4696
| * cmState::GetInitializedCacheValue: return cmPropVitaly Stakhovsky2020-04-301-4/+3
| | | | | | | | cmProp alias is used; no actual change in type
* | Refactoring: rename "cm_static_string_view.hxx" as <cmext/string_view>Marc Chevrier2020-04-301-1/+1
|/
* Refactoring: add cm::contains to <cmext/algorithm>Marc Chevrier2020-04-171-17/+16
|
* Merge topic 'msbuildUtf8Support'Brad King2020-04-151-26/+28
|\ | | | | | | | | | | | | bc877a7e94 Add support to indicate UTF-8 custom command pipe output encoding Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4587
| * Add support to indicate UTF-8 custom command pipe output encodingJustin Goshi2020-04-131-26/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a flag to indicate that pipe output from a custom command should be interpreted as UTF-8 encoded. This change does not introduce a public way to set the flag, but generators that create internally-generated commands know if they are calling cmake, which uses UTF-8 pipes. MSBuild added support for interpreting output of PreBuildEvent, PreLinkEvent, PostBuildEvent, and CustomBuildStep as UTF-8. This change will appear in Visual Studio 16.6 Preview 3. It is opt-in, and you need to add the StdOutEncoding tag. MSBuild treats these as property bags so if we emit the tag for earlier versions of Visual Studio it would be safely ignored. This change emits the StdOutEncoding tag and sets it to UTF-8 whenever the custom command UTF-8 pipe flag is set. This fixes globalization issues when the output from cmake contained characters that required MSBuild to interpret as UTF-8 before displaying them.
* | cmMakefile: use std::string_viewBen Boeckel2020-04-131-1/+2
| |
* | clang-tidy: address bugprone-branch-clone lintsBen Boeckel2020-04-131-4/+1
|/ | | | | | | | | Arguably, many of these are bugs in `clang-tidy`. An if/else tree with other conditionals between cloned blocks may be relying on the intermediate logic to fall out of the case and inverting this logic may be non-trivial. See: https://bugs.llvm.org/show_bug.cgi?id=44165
* cmMakefile::GetProperty: return cmPropVitaly Stakhovsky2020-04-011-36/+38
|
* cmTarget::GetProperty: return cmPropVitaly Stakhovsky2020-03-301-58/+54
|
* cmStateDirectory::GetProperty: return cmPropVitaly Stakhovsky2020-03-271-2/+4
|
* replace "std::string::find(x) == 0" with cmHasPrefix()Rolf Eike Beer2020-03-231-1/+1
|
* Merge topic 'export-repeat'Brad King2020-03-201-5/+11
|\ | | | | | | | | | | | | 8affe9aa33 export: Fix use-after-free on multiple calls overwriting same FILE Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4494
| * export: Fix use-after-free on multiple calls overwriting same FILEBrad King2020-03-191-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMake 3.16 and below allow multiple `export()` calls with the same output file even without using `APPEND`. The implementation worked by accident by leaking memory. Refactoring in commit 5444a8095d (cmGlobalGenerator: modernize memrory managemenbt, 2019-12-29, v3.17.0-rc1~239^2) cleaned up that memory leak and converted it to a use-after-free instead. The problem is caused by using the `cmGlobalGenerator::BuildExportSets` map to own `cmExportBuildFileGenerator` instances. It can own only one instance per output FILE name at a time, so repeating use of the same file now frees the old `cmExportBuildFileGenerator` instance and leaves the pointer in the `cmMakefile::ExportBuildFileGenerators` vector dangling. Move ownership of the instances into `cmMakefile`'s vector since its entries are not replaced on a repeat output FILE. In future work we should introduce a policy to error out on this case. For now simply fix the use-after-free to restore CMake <= 3.16 behavior. Fixes: #20469
* | cmState::GetCacheEntryValue: return cmPropVitaly Stakhovsky2020-03-171-1/+3
| |
* | cmake: add command line options to output script profiling dataWouter Klouwen2020-03-071-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For users of CMake who want to optimize their scripts if they take a while to run, this commit adds the ability to output profiling data. To enable this output, it adds the two command line parameters to select the output path and format. This commit adds the first profiling format of type ``google-trace``, which is the output is a JSON file containing Duration events as per the Google Trace Format specification: https://docs.google.com/document/d/1CvAClvFfyA5R- PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview#
* | cmake_command: Add command to EVAL a CMake script as a stringCristian Adam2020-03-031-0/+21
| |
* | Add deprecation warnings for policies CMP0071 and belowBrad King2020-02-171-1/+1
|/ | | | | | | The OLD behaviors of all policies are deprecated, but only by documentation. Add an explicit deprecation diagnostic for policies introduced in CMake 3.10 and below to encourage projects to port away from setting policies to OLD.
* Merge topic 'mf-json-type'Brad King2020-01-291-3/+2
|\ | | | | | | | | | | | | 5a72ffb33a cmMakefile: Fix construction of Json::Value from fixed-size int types Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4291
| * cmMakefile: Fix construction of Json::Value from fixed-size int typesRaul Tambre2020-01-281-3/+2
| | | | | | | | | | | | | | Cast to the Json-provided fixed-size integer types rather than assuming that the `std::*` variants match. Fixes: #20278
* | AppendProperty: convert value param to std::stringVitaly Stakhovsky2020-01-251-5/+5
|/
* Merge topic 'trace_json_timestamp'Brad King2020-01-241-0/+3
|\ | | | | | | | | | | | | | | c829f0cfca trace: Add time and stack level to JSON output format Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Volo Zyko <volo.zyko@gmail.com> Merge-request: !4242
| * trace: Add time and stack level to JSON output formatFrank Winklmeier2020-01-221-0/+3
| | | | | | | | | | | | | | | | Add the timestamp and stack depth of the function call to the JSON trace output format. This information can be useful for cmake profiling and call stack inspection (see e.g. https://github.com/volo-zyko/cmake-profile-stats). Improve unit test to allow for varying set of keys to check in trace lines.
* | cmInstall*Generator: std::string paramsVitaly Stakhovsky2020-01-211-1/+1
|/ | | | | Several construction parameters converted to std::string Also made a few class members const
* cmMakefile: modernize memory managementMarc Chevrier2020-01-141-29/+38
|
* Merge topic 'refactoring-STL-erase_if'Brad King2020-01-131-2/+3
|\ | | | | | | | | | | | | | | | | 968477517e Refactoring: suppress cmEraseIf in favor of cm::erase_if 348b60d19d STL support: add c++20 std::erase and std::erase_if functions Acked-by: Kitware Robot <kwrobot@kitware.com> Rejected-by: Leonid Pospelov <pospelovlm@yandex.ru> Merge-request: !4192
| * Refactoring: suppress cmEraseIf in favor of cm::erase_ifMarc Chevrier2020-01-091-2/+3
| |
* | target_link_libraries: Fix out-of-dir calls with debug/optimized keywordsBrad King2020-01-101-1/+1
|/ | | | | | | | | | In commit a1ad0a699b (target_link_libraries: Allow use with targets in other directories, 2018-09-07, v3.13.0-rc1~94^2) we added use of `<...>` to encode a directory id, but the closing `>` can incorrectly terminate a surrounding generator expression early. Encode the directory id using `(...)` instead. Fixes: #20202
* GlobalGenerator family: modernize memory managementMarc Chevrier2020-01-071-5/+5
|
* cmGlobalGenerator: modernize memrory managemenbtMarc Chevrier2019-12-301-2/+5
|
* Merge topic 'traceJSON'Kyle Edwards2019-12-271-7/+40
|\ | | | | | | | | | | | | | | e113ab1168 trace: Add test for the JSON-v1 trace 482497e0de trace: Add JSON output format Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4102
| * trace: Add JSON output formatDaniel Mensinger2019-12-231-7/+40
| | | | | | | | | | | | | | | | Add a new `--trace-format=` flag, to enable the new JSON trace output format. This new format is easier to parse by machines than the existing format. This new format also removes the ambiguity of the whitespace in the "old" format (e.g. is that whitespace part of a file path, or does it seperate arguments)
* | Merge topic 'add_find_call_debugging'Kyle Edwards2019-12-201-1/+8
|\ \ | |/ |/| | | | | | | | | | | | | f3c9396260 Help: Document CMAKE_FIND_DEBUG_MODE 204b8d9f4e find_*: Use debug logging infrastructure a7ea20649d find_*: Add debug logging infrastructure Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3935
| * find_*: Add debug logging infrastructureRobert Maynard2019-12-191-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | Enable debug messages a new `--find-debug` command-line option or via the `CMAKE_FIND_DEBUG_MODE` variable. This work was started by Chris Wilson, continued by Ray Donnelly, and then refactored by Robert Maynard to collect information into a single message per find query. Co-Author: Ray Donnelly <mingw.android@gmail.com> Co-Author: Chris Wilson <chris+github@qwirx.com>
* | Merge topic 'add-header-cmext-algorithm'Brad King2019-12-181-1/+2
|\ \ | |/ |/| | | | | | | | | | | f7d12609f0 Refactoring: use append functions from cmext/algorithm a38d04c076 Refactoring: introduce header cmext/algorithm with append functions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4131
| * Refactoring: use append functions from cmext/algorithmMarc Chevrier2019-12-171-1/+2
| |
* | Merge topic 'stdstring-target'Brad King2019-12-171-4/+4
|\ \ | |/ |/| | | | | | | | | c34b4497f8 cmTarget: add std::string overloads Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4137
| * cmTarget: add std::string overloadsVitaly Stakhovsky2019-12-141-4/+4
| |
* | Ninja: Add multi-config variantKyle Edwards2019-12-131-2/+3
|/ | | | Co-Authored-by: vector-of-bool <vectorofbool@gmail.com>
* CUDA: Add cuda meta-features (e.g. ``cuda_std_11``) supportRobert Maynard2019-12-101-30/+189
|
* cmMakefile: Delay custom command creationDaniel Eiband2019-11-241-226/+170
| | | | | | | | Move custom command creation to cmLocalGenerator and dispatch custom commands in cmMakefile to generate time. Generators add custom commands using the new methods provided by cmLocalGenerator. Issue: #12877
* cmCustomCommand: Explicitly pass backtrace on constructionDaniel Eiband2019-11-241-3/+4
|
* cmMakefile: Explicitly pass backtrace to GetCustomCommandTargetDaniel Eiband2019-11-241-19/+19
| | | | | Allow GetCustomCommandTarget to be called at generate time with correct backtraces.
* cmMakefile: Delay CheckTargetProperties and FinalPass to generate timeDaniel Eiband2019-11-241-7/+10
|