summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Add deprecation warnings for policies CMP0069 and belowBrad King2019-10-101-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.9 and below to encourage projects to port away from setting policies to OLD.
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-5/+7
| | | | | 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.
* Merge topic 'fix-EXCLUDE_FROM_ALL-subdir-all'Brad King2019-09-301-6/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | dce58afd30 Merge branch 'backport-3.15-fix-EXCLUDE_FROM_ALL-subdir-all' 013d7dd484 Help: Mention 3.14.7 EXCLUDE_FROM_ALL fix in 3.15.4 release note 61103c0bac Merge branch 'backport-3.14-fix-EXCLUDE_FROM_ALL-subdir-all' 1fe4501592 Help: Add release note for EXCLUDE_FROM_ALL fix in 3.15.4 05d7ca14e9 Merge branch 'backport-3.14-fix-EXCLUDE_FROM_ALL-subdir-all' 62d45d91e8 Help: Add release note for EXCLUDE_FROM_ALL fix in 3.14.7 b3b1c7bf3a Restore "all" target in subdirectories marked EXCLUDE_FROM_ALL 156b56480a Makefiles: Revert "Make build root targets ... recursive" ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3863
| * Merge branch 'backport-3.15-fix-EXCLUDE_FROM_ALL-subdir-all'Brad King2019-09-301-6/+4
| |\ | | | | | | | | | | | | | | | | | | | | | Resolve conflicts with changes since the 3.15 series: * Convert `cmSystemTools::IsOn` => `cmIsOn`. * Move one "EXCLUDE_FROM_ALL" target property logic fix to its new location in `cmMakefile::AddNewUtilityTarget`.
| | * Merge branch 'backport-3.14-fix-EXCLUDE_FROM_ALL-subdir-all'Brad King2019-09-301-6/+4
| | |\
| | | * Restore "all" target in subdirectories marked EXCLUDE_FROM_ALLBrad King2019-09-301-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "all" target in each directory is supposed to have targets from that directory even if the directory itself is marked `EXCLUDE_FROM_ALL` in its parent. This was broken by commit dc6888573d (Pass EXCLUDE_FROM_ALL from directory to targets, 2019-01-15, v3.14.0-rc1~83^2) which made the participation of a target in "all" independent of context. Revert much of the logic change from that commit to restore the old behavior. Then re-implement the behavior intended by the commit to keep its test working. Extend the test to cover the old behavior too. Fixes: #19753
* | | | Merge topic 'objective-c-cxx'Brad King2019-09-301-68/+80
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dd0f304613 Objective C/C++: Add compiler standard detection b515af782b Help: Add release note for Objective-C/C++ language support 9e66397c28 Languages: Add support for Objective-C++ 80f120a85f Languages: Add support for Objective-C Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3811
| * | | Objective C/C++: Add compiler standard detectionCristian Adam2019-09-281-68/+80
| | | |
* | | | cmMakefile: Remove AddUtilityCommand overload without byproductsDaniel Eiband2019-09-261-16/+2
| | | |
* | | | cmMakefile: Extract utilities used for creation of custom commandsDaniel Eiband2019-09-261-117/+144
| | | | | | | | | | | | | | | | Decompose creation of custom commands further into logical steps.
* | | | cmCustomCommand: Move custom commandsDaniel Eiband2019-09-261-3/+3
| | | |
* | | | cmMakefile: Move enumerations into new headerDaniel Eiband2019-09-261-13/+14
|/ / / | | | | | | | | | The enumerations will also be used in cmLocalGenerator.
* | | Merge topic 'cmake-system-headers'Brad King2019-09-201-3/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4a08690ccf cmstd: Extend header <cm/iterator> c688b401d3 cmstd: Modernize CMake system headers Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3776
| * | | cmstd: Modernize CMake system headersMarc Chevrier2019-09-201-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge topic 'pch-source-list'Brad King2019-09-201-0/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9d2ac86f45 Precompile Headers: Add precompile header file to source list Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3832
| * | | | Precompile Headers: Add precompile header file to source listCristian Adam2019-09-191-0/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | The precompile header file will be added to the list of files, and be part of the newly "Precompile Header File" source group. Also make sure the sources have the header as dependency.
* | | | Merge topic 'split-custom-command-creation'Brad King2019-09-201-92/+214
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0e1faa28cb cmMakefile: Separate custom command setup from actual creation 56c204e8eb cmMakefile: Refactor AddCustomCommandOldStyle to be delay friendly 3061dc6ac9 add_custom_command: Add tests for rejecting literal quotes in commands e893ab94ba cmMakefile: Validate command line for all custom commands f1e846fdde cmMakefile: Extract custom command validation method 4926ab2454 cmMakefile: Create all generated byproducts as known sources Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3822
| * | | cmMakefile: Separate custom command setup from actual creationDaniel Eiband2019-09-171-51/+138
| | | | | | | | | | | | | | | | | | | | Refactor custom command manipulation functions to consist of a setup and a commit stage. The commit stage will be delayed to generate time.