summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * 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
|
* cmStateDirectory::GetProperty: return cmPropVitaly Stakhovsky2020-03-271-2/+4
|
* replace "std::string::find(x) == 0" with cmHasPrefix()Rolf Eike Beer2020-03-231-1/+1
|
* Merge topic 'export-repeat'Brad King2020-03-201-5/+11
|\ | | | | | | | | | | | | 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-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | cmState::GetCacheEntryValue: return cmPropVitaly Stakhovsky2020-03-171-1/+3
| |
* | cmake: add command line options to output script profiling dataWouter Klouwen2020-03-071-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For users of CMake who want to optimize their scripts if they take a while to run, this commit adds the ability to output profiling data. To enable this output, it adds the two command line parameters to select the output path and format. This commit adds the first profiling format of type ``google-trace``, which is the output is a JSON file containing Duration events as per the Google Trace Format specification: https://docs.google.com/document/d/1CvAClvFfyA5R- PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview#
* | cmake_command: Add command to EVAL a CMake script as a stringCristian Adam2020-03-031-0/+21
| |
* | Add deprecation warnings for policies CMP0071 and belowBrad King2020-02-171-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.10 and below to encourage projects to port away from setting policies to OLD.
* Merge topic 'mf-json-type'Brad King2020-01-291-3/+2
|\ | | | | | | | | | | | | 5a72ffb33a cmMakefile: Fix construction of Json::Value from fixed-size int types Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4291