summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.h
Commit message (Collapse)AuthorAgeFilesLines
* cmake_language: Add signature to DEFER calls to later timesBrad King2020-09-291-4/+33
| | | | Fixes: #19575
* cmMakefile: Clarify name of internal list file run methodBrad King2020-09-291-2/+2
|
* cmMakefile: Replace GetExecutionFilePath with the top of the BacktraceBrad King2020-09-281-2/+0
| | | | | | 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-5/+2
| | | | | | | | | | | 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-1/+0
|
* cmMakefile: Inline GetExecutionContext at call sitesBrad King2020-09-281-1/+0
| | | | | The method only had one line, and its implementation is more clear at the call sites than the method name.
* Merge topic 'GetExecutionListFile-by-ref'Brad King2020-09-081-1/+1
|\ | | | | | | | | | | | | 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-1/+1
| |
* | Modernize: Use #pragma once in all header filesKitware Robot2020-09-031-4/+1
|/ | | | | | | | | | | | | | | | #pragma once is a widely supported compiler pragma, even though it is not part of the C++ standard. Many of the issues keeping #pragma once from being standardized (distributed filesystems, build farms, hard links, etc.) do not apply to CMake - it is easy to build CMake on a single machine. CMake also does not install any header files which can be consumed by other projects (though cmCPluginAPI.h has been deliberately omitted from this conversion in case anyone is still using it.) Finally, #pragma once has been required to build CMake since at least August 2017 (7f29bbe6 enabled server mode unconditionally, which had been using #pragma once since September 2016 (b13d3e0d)). The fact that we now require C++11 filters out old compilers, and it is unlikely that there is a compiler which supports C++11 but does not support #pragma once.
* cmMakefile::GetDefinition: return cmPropVitaly Stakhovsky2020-09-021-2/+1
|
* file(GENERATE): Add TARGET argumentRaul Tambre2020-08-201-1/+1
| | | | | | | Adds TARGET argument to file(GENERATE) to make resolving generator expressions requiring a target possible. Implements #21101, fixes #21074.
* Merge topic 'refactor-generator-configs'Brad King2020-07-061-4/+11
|\ | | | | | | | | | | | | 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-4/+11
| |
* | cmStandardLevelResolver: Added to handle standard level queriesRobert Maynard2020-07-011-86/+0
|/ | | | Refactored out of cmMakefile
* Merge topic 'remove-warn-unused-vars'Craig Scott2020-07-011-7/+0
|\ | | | | | | | | | | | | | | 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-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+1
|/ | | | Issue: #20866
* Refactor language standard computationJustin Goshi2020-06-161-9/+45
| | | | | 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-2/+3
| | | | The implementation needs only the target name.
* add_library/add_executable: allow local alias to imported targetsMarc Chevrier2020-06-021-1/+2
| | | | Fixes: #20641
* Merge topic 'getdef-expand'Brad King2020-06-021-0/+2
|\ | | | | | | | | | | | | 7ed8c9ebe3 cmMakefile: add GetDefExpandList() that splits value into std::vector Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4819
| * cmMakefile: add GetDefExpandList() that splits value into std::vectorVitaly Stakhovsky2020-05-301-0/+2
| | | | | | | | Combines cmMakefile:GetDefinition() and cmExpandList()
* | Single location for cmProp typedefVitaly Stakhovsky2020-06-011-2/+1
|/
* Add support to indicate UTF-8 custom command pipe output encodingJustin Goshi2020-04-131-4/+8
| | | | | | | | | | | | | | | | | 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::GetProperty: return cmPropVitaly Stakhovsky2020-04-011-3/+6
|
* Merge topic 'export-repeat'Brad King2020-03-201-4/+6
|\ | | | | | | | | | | | | 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-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | cmMakefile::AddCacheDefinition: Add overload that accepts std::string valueVitaly Stakhovsky2020-03-111-0/+6
| |
* | cmake_command: Add command to EVAL a CMake script as a stringCristian Adam2020-03-031-0/+3
|/
* Source: use std::string in place of const char*Vitaly Stakhovsky2020-01-291-2/+2
|
* Merge topic 'mf-typo'Brad King2020-01-281-1/+1
|\ | | | | | | | | | | | | 7b6af980eb cmMakefile: Fix spelling typo in comment Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4292
| * cmMakefile: Fix spelling typo in commentMasashi Fujita2020-01-281-1/+1
| |
* | AppendProperty: convert value param to std::stringVitaly Stakhovsky2020-01-251-1/+1
|/
* cmMakefile: modernize memory managementMarc Chevrier2020-01-141-26/+22
|
* find_*: Add debug logging infrastructureRobert Maynard2019-12-191-2/+13
| | | | | | | | | | | | 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>
* CUDA: Add cuda meta-features (e.g. ``cuda_std_11``) supportRobert Maynard2019-12-101-1/+11
|
* cmMakefile: Delay custom command creationDaniel Eiband2019-11-241-45/+32
| | | | | | | | 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
* cmMakefile: Explicitly pass backtrace to GetCustomCommandTargetDaniel Eiband2019-11-241-2/+3
| | | | | Allow GetCustomCommandTarget to be called at generate time with correct backtraces.
* cmMakefile: Delay CheckTargetProperties and FinalPass to generate timeDaniel Eiband2019-11-241-12/+13
|
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-1/+2
| | | | | 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 'objective-c-cxx'Brad King2019-09-301-4/+10
|\ | | | | | | | | | | | | | | | | | | 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-4/+10
| |
* | cmMakefile: Remove AddUtilityCommand overload without byproductsDaniel Eiband2019-09-261-7/+0
| |
* | cmMakefile: Extract utilities used for creation of custom commandsDaniel Eiband2019-09-261-13/+39
| | | | | | | | Decompose creation of custom commands further into logical steps.
* | cmMakefile: Move enumerations into new headerDaniel Eiband2019-09-261-22/+14
|/ | | | The enumerations will also be used in cmLocalGenerator.
* Merge topic 'cmake-system-headers'Brad King2019-09-201-1/+1
|\ | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 'split-custom-command-creation'Brad King2019-09-201-8/+46
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | 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-5/+43
| | | | | | | | | | Refactor custom command manipulation functions to consist of a setup and a commit stage. The commit stage will be delayed to generate time.
| * cmMakefile: Validate command line for all custom commandsDaniel Eiband2019-09-171-1/+1
| |