summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'autogen-cmp0116-fix'Brad King2021-02-241-23/+29
|\ | | | | | | | | | | | | | | | | | | | | 339dbc901f Help: Note that CMP0116 is recorded at the time of CC creation e3740e020e Tests: Test Qt autogen target with CMP0116 set to WARN cf34011ce7 Tests: Test per-CC behavior of CMP0116 3a95503512 Ninja: Use CMP0116 status recorded at time of custom command's creation f01f10e8fb cmCustomCommand: Record value of CMP0116 at time of creation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5848
| * cmCustomCommand: Record value of CMP0116 at time of creationKyle Edwards2021-02-231-23/+29
| |
* | Add deprecation warnings for policies CMP0081 and belowBrad King2021-02-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.13 and below to encourage projects to port away from setting policies to OLD.
* Merge topic 'issue-19198'Brad King2021-02-021-3/+3
|\ | | | | | | | | | | | | | | 255df8622b file(GENERATE): Support new line style Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Brad King <brad.king@kitware.com> Merge-request: !5649
| * file(GENERATE): Support new line styleAsit Dhal2021-02-011-3/+3
| | | | | | | | Fixes: #19198
* | cmInstallGenerator: Add backtrace to all install generatorsBrad King2021-01-281-1/+1
|/
* clang-tidy: fix `readability-qualified-auto` warningsBen Boeckel2021-01-271-2/+2
|
* Merge topic 'trace_expand_bracket'Brad King2021-01-121-1/+1
|\ | | | | | | | | | | | | e6e7f2cab9 cmMakefile: Don't expand bracket arguments in --trace-expand Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5687
| * cmMakefile: Don't expand bracket arguments in --trace-expandRaul Tambre2021-01-111-1/+1
| | | | | | | | | | | | Bracket arguments are literal and shouldn't be expanded. Fixes #21671.
* | Merge topic 'cpp-modules'Brad King2021-01-071-3/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 39cbbb59a5 ninja: add experimental infrastructure to generate gcc-format modmap files 791b4d26d6 ninja: add experimental infrastructure to generate modmap files with dyndep 4b23359117 ninja: Add experimental infrastructure for C++20 module dependency scanning f814d3b3c6 cmNinjaTargetGenerator: use $OBJ_FILE for the object b0fc2993e1 Treat the '.mpp' file extension as C++ code 988f997100 cmScanDepFormat: Fix name of our internal tool in parse errors dacd93a2db ninja: De-duplicate version numbers required for ninja features 533386ca29 cmStandardLevelResolver: Factor out helper to capture stoi exceptions Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Acked-by: Robert Maynard <robert.maynard@kitware.com> Acked-by: Shannon Booth <shannon.ml.booth@gmail.com> Merge-request: !5562
| * | Treat the '.mpp' file extension as C++ codeBen Boeckel2021-01-051-3/+4
| | | | | | | | | | | | This is the extension required in build2 for C++ module support.
* | | Code style: add missed explicit 'this->'Oleksandr Koval2021-01-051-14/+14
|/ / | | | | | | | | CMake uses explicit 'this->' style. Using custom clang-tidy check we can detect and fix places where 'this->' was missed.
* | file(GENERATE): Support options to manipulate file permissionsAsit Dhal2020-12-211-2/+3
| | | | | | | | Fixes: #15653
* | cmLocalGenerator: Adopt custom target 'force' output name generationBrad King2020-12-151-20/+2
| |
* | cmMakefile: Simplify custom target 'force' output name generationBrad King2020-12-151-17/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary check of policy CMP0049. The policy can never trigger on our internally-generated name because it has no variable references. The rename in commit 0ed5ce4cd8 (cmTarget: Rename AddSource method for backward compatibility., 2014-03-17, v3.1.0-rc1~688^2~17) made it look like this code path depended on CMP0049. Then commit 0e1faa28cb (cmMakefile: Separate custom command setup from actual creation, 2019-09-14, v3.16.0-rc1~85^2) and commit ea1bed34b2 (cmMakefile: Extract utilities used for creation of custom commands, 2019-09-21, v3.16.0-rc1~52^2~1) built additional infrastructure to thread that dependence through the call stack. Remove it all.
* | GENERATED prop: Add implementation for policy CMP0118 being set to NEWDeniz Bahadir2020-11-241-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Adding implementation for policy CMP0118 being set to `NEW`. * Adding new tests for policy CMP0118 being set to `NEW`. * Checking the `GENERATED` property with `get_source_file_property` or `get_property` now always returns exactly `1` or `0`. No other values will be returned. Note, that this is a backwards-incompatible change, even when policy CMP0118 is unset or set to `OLD`. * Additionally, as `get_source_file_property` and `get_property` now always check if a source-file was marked globally visible, even when CMP0118 is unset or set to `OLD`, they possibly return `1` where they might have returned `0` before the changes introduced by this commit. Note, that this is a backwards-incompatible change, even when policy CMP0118 is unset or set to `OLD`. * As a consequence, the tests for policy CMP0118 being unset or set to `OLD` got slightly adjusted, too, to reflect these changes in behavior.
* | Reduce the scope of temporary cmProp variables and other improvementsVitaly Stakhovsky2020-11-051-8/+6
| |
* | configure_file: Add option for user defined permissionsAsit Dhal2020-10-241-15/+5
| | | | | | | | | | | | | | User defined permissions and options to copy permissions are implemented. Fixes: #20866
* | Constify some code as suggested by clang-tidyCengizhan Pasaoglu2020-10-191-5/+5
| |
* | Merge topic 'fix-refactor-generator-configs'Brad King2020-10-161-3/+2
|\ \ | |/ | | | | | | | | | | b9cb1d324d Fix regression in test/install/package configuration selection Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5381
| * Fix regression in test/install/package configuration selectionBrad King2020-10-151-3/+2
| | | | | | | | | | | | | | | | | | | | In commit 7a969fe21d (cmMakefile: Refactor API to better handle empty config values, 2020-06-30, v3.19.0-rc1~567^2), calls to `GetGeneratorConfigs` that pass `OnlyMultiConfig` only want to get any configurations listed if the generator is multi-config. Fix the implementation to actually do that. Fixes: #21316
* | Add deprecation warnings for policies CMP0075 and belowBrad King2020-10-131-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.12 and below to encourage projects to port away from setting policies to OLD.
* | cmMakefile: Consolidate CreateGenerated{Outputs,Byproducts}Brad King2020-10-081-13/+3
| | | | | | | | | | The implementations of these two methods are now identical, so combine them.
* | cmLocalGenerator: Migrate custom command output lookup from cmMakefileBrad King2020-10-081-185/+0
| | | | | | | | | | | | | | Since commit 777ceaea94 (cmMakefile: Delay custom command creation, 2019-10-17, v3.17.0-rc1~352^2) we process custom command declarations at generate time. Therefore we do not need to look up what source file holds the custom command producing a given output until generate time.
* | cmMakefile: Drop unnecessary custom command APPEND checkBrad King2020-10-081-50/+1
|/ | | | | | | Since commit 777ceaea94 (cmMakefile: Delay custom command creation, 2019-10-17, v3.17.0-rc1~352^2) we process custom command declarations at generate time. This includes the append-to-non-existing-command check, so we do not need it at configure time.
* cmListFileCache: Make cmListFileFunction a shared pointerOleksandr Koval2020-10-011-21/+21
| | | | | Passing cmListFileFunction everywhere by-value involves big overhead. Now cmListFileFunction stores std::shared_ptr to the underlying data.
* cmake_language: Add signature to DEFER calls to later timesBrad King2020-09-291-11/+179
| | | | Fixes: #19575
* cmMakefile: Clarify name of internal list file run methodBrad King2020-09-291-6/+6
|
* cmMakefile: Replace GetExecutionFilePath with the top of the BacktraceBrad King2020-09-281-11/+5
| | | | | | The execution file path stack and the backtrace stack are kept in sync. At all call sites of `GetExecutionFilePath`, the execution file path matches the path in the context at the top of the backtrace stack.
* cmMakefile: Simplify ExpandArguments signatureBrad King2020-09-281-15/+8
| | | | | | | | | | | The only call sites that pass the explicit file name argument are in function blocker `ArgumentsMatch` methods for `function` and `macro`. We already ensure that they are balanced within a file scope, and the RAII helpers `BuildsystemFileScope` and `ListFileScope` ensure that the backtrace and execution list file stacks unwind to the matching level. Therefore we can assume that the file name where we are checking for matching arguments matches starting file name where those arguments first appeared, and do not need to pass it explicitly.
* cmMakefile: Remove now-unused overload of GetBacktraceBrad King2020-09-281-9/+0
|
* cmMakefile: Inline GetExecutionContext at call sitesBrad King2020-09-281-6/+1
| | | | | The method only had one line, and its implementation is more clear at the call sites than the method name.
* cmMakefile: Simplify GetExecutionContext implementationBrad King2020-09-281-6/+1
| | | | | | | | This method takes the function name and line from the top of the current backtrace and then gets the file path from the state's `GetExecutionListFile`. This exactly matches what the `cmMakefileCall` constructor does to create the top of the current backtrace anyway, so we can just take that directly.
* cmCommandArgumentParserHelper: rework input handlingOleksandr Koval2020-09-091-1/+1
| | | | | | | | Old implementation uses involved Flex input management technique that requires usage of obsolete YY_INPUT macro. This causes a lot of useless allocations and byte-by-byte scanning. New implementation avoids those hacks, it uses yy_scan_string() API to setup Flex input. Also it fixes reporting of syntax error position and corresponding tests.
* Merge topic 'GetExecutionListFile-by-ref'Brad King2020-09-081-3/+3
|\ | | | | | | | | | | | | 879bd7fd9c cmStateSnapshot: Return const reference from GetExecutionListFile() Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5186
| * cmStateSnapshot: Return const reference from GetExecutionListFile()Oleksandr Koval2020-09-031-3/+3
| |
* | Refactor: Use cmToCStr()Vitaly Stakhovsky2020-09-031-6/+6
|/
* cmMakefile::GetDefinition: return cmPropVitaly Stakhovsky2020-09-021-59/+50
|
* file(GENERATE): Add TARGET argumentRaul Tambre2020-08-201-3/+3
| | | | | | | Adds TARGET argument to file(GENERATE) to make resolving generator expressions requiring a target possible. Implements #21101, fixes #21074.
* Bootstrap: Add support for NinjaKyle Edwards2020-08-101-2/+4
|
* Source: use cmNonempty()Vitaly Stakhovsky2020-07-281-1/+1
|
* cmIsOn: add overload accepting const std::string*Vitaly Stakhovsky2020-07-141-4/+2
|
* Merge topic 'imported-local-target-alias'Brad King2020-07-131-0/+3
|\ | | | | | | | | | | | | 7b0f6508a0 ALIAS targets: Non-global aliases must be propagated to sub-directories Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5002
| * ALIAS targets: Non-global aliases must be propagated to sub-directoriesMarc Chevrier2020-07-111-0/+3
| | | | | | | | Fixes: #20942
* | Merge topic 'refactor-generator-configs'Brad King2020-07-061-14/+17
|\ \ | | | | | | | | | | | | | | | | | | 7a969fe21d cmMakefile: Refactor API to better handle empty config values Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4957
| * | cmMakefile: Refactor API to better handle empty config valuesRobert Maynard2020-07-031-14/+17
| | |
* | | cmStandardLevelResolver: Added to handle standard level queriesRobert Maynard2020-07-011-781/+0
|/ / | | | | | | Refactored out of cmMakefile
* | Merge topic 'remove-warn-unused-vars'Craig Scott2020-07-011-42/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | df6b077625 cmake: Remove broken '--warn-unused-vars' option Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !4953
| * | cmake: Remove broken '--warn-unused-vars' optionBrad King2020-06-291-42/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This option has been broken since commit b9f9915516 (cmMakefile: Remove VarUsageStack., 2015-05-17, v3.3.0-rc1~52^2). That commit removed the check that an initialized variable has actually been used and caused the option to warn on every variable ever set. This was not caught by the test suite because the test for the feature only checked that warnings appear when needed and not that they do not appear when not needed. The option was never very practical to use. Remove it to avoid the runtime cost of usage tracking and checks for every variable (which we were doing even when the option was not used).
* | | configure_file: Add option to control file permissions transfer to copyRahul Gottipati2020-06-301-1/+16
|/ / | | | | | | Issue: #20866