summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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
* | 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-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