summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
Commit message (Collapse)AuthorAgeFilesLines
* cmake: Model normal and try-compile project kinds explicitlyBrad King2021-07-121-2/+2
| | | | | Construct with the project kind instead of mutating state after construction.
* cmMakefile: Split out CreateNewTarget from AddNewTargetNAKAMURA Takumi2021-07-081-6/+14
| | | | `CreateNewTarget` tells whether the target is inserted or not.
* Merge topic 'env-init-configs'Brad King2021-07-011-0/+17
|\ | | | | | | | | | | | | | | | | | | | | ef56eefc9b cmake: Allow CMAKE_CONFIGURATION_TYPES to be set by environment variable e216b9bbd3 cmake: Allow CMAKE_BUILD_TYPE to be set by environment variable 6986a382a9 Help: Document when CMAKE_BUILD_TYPE and CMAKE_CONFIGURATION_TYPES are set e96169a3ec Help: Cross-reference CMAKE_CONFIGURATION_TYPES from CMAKE_BUILD_TYPE 03bd9c4c10 cmMakefile: Add helper to initialize CMAKE_CONFIGURATION_TYPES Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6291
| * cmake: Allow CMAKE_CONFIGURATION_TYPES to be set by environment variableBrad King2021-06-301-1/+5
| | | | | | | | | | | | | | | | When no `CMAKE_CONFIGURATION_TYPES` is explicitly specified while creating a new build tree, check for an environment variable of the same name. Issue: #20983
| * cmMakefile: Add helper to initialize CMAKE_CONFIGURATION_TYPESBrad King2021-06-301-0/+13
| | | | | | | | | | Factor out duplicate code from the Ninja Multi-Config, Visual Studio, and Xcode generators.
* | Add deprecation warnings for policies CMP0088 and belowBrad King2021-06-301-4/+3
|/ | | | | | | The OLD behaviors of all policies are deprecated, but only by documentation. Add an explicit deprecation diagnostic for policies introduced in CMake 3.14 and below to encourage projects to port away from setting policies to OLD.
* CMP0126: Add control for warningsMarc Chevrier2021-06-291-3/+20
| | | | Fixes: #22353
* cmState: Record imported target names in each directoryBrad King2021-06-101-0/+1
| | | | | Model the change after commit 089868a244 (cmState: Record buildsystem target names in each directory, 2016-09-16, v3.7.0-rc1~79^2~3).
* cmMakefile: Register explicit object sources more efficientlyBrad King2021-05-281-1/+2
| | | | `AddTargetObject` knows the location of object files.
* Merge topic 'set-cache-keep-normal-variable'Brad King2021-05-251-4/+4
|\ | | | | | | | | | | | | | | d96eb55282 set(CACHE): do not remove normal variable Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !6146
| * set(CACHE): do not remove normal variableMarc Chevrier2021-05-201-4/+4
| | | | | | | | Fixes: #22038
* | Merge branch 'master' into cmp0082-exclude-from-allKyle Edwards2021-05-241-6/+22
|\ \ | |/
| * Merge topic 'find_item-consistent-behavior-cache-variables'Brad King2021-05-131-0/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | 08db1341a6 find_*: ensure consistent behavior for cache variables f5fa6d53b0 class cmake: Store working directory at cmake launch b1729200c3 find_*: refactor cache variable handling Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6110
| | * find_*: ensure consistent behavior for cache variablesMarc Chevrier2021-05-121-0/+2
| | | | | | | | | | | | Fixes: #22121
| * | Source: Minor code improvementsVitaly Stakhovsky2021-05-111-3/+3
| |/
| * Source: Fix typos and spelling in commentsJosef Angstenberger2021-05-071-1/+1
| |
| * foreach(): loop variables are only available in the loop scopeMarc Chevrier2021-04-281-0/+14
| | | | | | | | Fixes: #20553
| * Treat '.ixx' and '.cppm' files as C++ sourcesAndrew Gilewsky2021-03-221-1/+1
| | | | | | | | | | These extensions are used by convention for C++ modules and interface units with MSVC.
| * 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
| * | 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.
* | | CMP0082: Check EXCLUDE_FROM_ALL property at generate timeKyle Edwards2021-05-241-1/+1
| |/ |/| | | | | Fixes: #22234
* | cmCustomCommand: Record value of CMP0116 at time of creationKyle Edwards2021-02-231-23/+29
|/
* 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
|