summaryrefslogtreecommitdiff
path: root/Source/cmMakefile.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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
* 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-041-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
* | Merge topic 'fileApiAddLanguageStandardBacktrace'Brad King2020-06-291-3/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 7d6861f367 fileapi: Extend codemodel targets with language standard ba835874a4 Add backtrace support for language standard e43486a639 cmGeneratorTarget: Clarify name of language property lookup helper Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4798
| * | Add backtrace support for language standardJustin Goshi2020-06-221-3/+3
| | |
* | | Deprecate compatibility with CMake versions older than 2.8.12Brad King2020-06-181-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Issue a deprecation warning on calls to `cmake_minimum_required` or `cmake_policy` that set policies based on versions older than 2.8.12. Note that the effective policy version includes `...<max>` treatment. This is important in combination with commit ca24b70d31 (Export: Specify a policy range in exported files, 2020-05-16, v3.18.0-rc1~133^2).
* | | cmStateSnapshot: Invert CanPopPolicyScope return value to match nameBrad King2020-06-181-1/+1
|/ /
* | Merge topic 'languageStandardRefactor'Brad King2020-06-181-43/+156
|\ \ | | | | | | | | | | | | | | | | | | | | | 742ff97f80 Refactor language standard computation 0892c798f7 cmMakefile: Change CompileFeatureKnown to take target name instead of target Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4803
| * | Refactor language standard computationJustin Goshi2020-06-161-41/+154
| | | | | | | | | | | | | | | Instead of mutating the configure-time cmTarget's properties at generate time, compute and store it in a cmGeneratorTarget field.
| * | cmMakefile: Change CompileFeatureKnown to take target name instead of targetJustin Goshi2020-06-151-3/+3
| | | | | | | | | | | | The implementation needs only the target name.
* | | cmake: implement error handling in configure_fileAsit Dhal2020-06-171-1/+9
|/ / | | | | | | | | | | Implement error handling in case it fails Fixes: #20696
* | Add deprecation warnings for policies CMP0072 and belowBrad King2020-06-121-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.11 and below to encourage projects to port away from setting policies to OLD.
* 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-111-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
|