Commit Graph

47352 Commits

Author SHA1 Message Date
Brad King
8fad32f5b9 Merge topic 'trace-format-json-doc' into release-3.17
1994f950ff cmake: List valid values for --trace-format on the command line
e39766d84a Help: Fix documentation of --trace-format parameter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4500
2020-03-19 06:57:51 -04:00
Brad King
8affe9aa33 export: Fix use-after-free on multiple calls overwriting same FILE
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
2020-03-19 06:41:39 -04:00
Kitware Robot
d995be9ead CMake Nightly Date Stamp 2020-03-19 00:01:09 -04:00
Kyle Edwards
1994f950ff cmake: List valid values for --trace-format on the command line 2020-03-18 16:16:46 -04:00
Kyle Edwards
e39766d84a Help: Fix documentation of --trace-format parameter 2020-03-18 16:02:04 -04:00
Hannes Vogt
36baf1f13c CheckLanguage: hide commonly used variable names
The check_language sets internal variables with a common name in the
caller's scope: `result`, `output` and `content`.
They are now prefixed with `_cl_`,
inspired by the CheckLibraryExists module.
2020-03-18 17:47:06 +01:00
Brad King
863b0fa2ac Merge topic 'FindRuby-updates'
46064c8193 FindRuby: Add support for versions up to 2.7
675eaf3bd0 FindRuby: Update MSVC runtime library selection
b970e25d98 FindRuby: Remove extra whitespace
ecdace4d61 FindRuby: Include FPHSA closer to where it is used
f52f496138 FindRuby: Provide Ruby_LIBRARIES result variable
b00d736a0b FindRuby: Add dedicated tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4481
2020-03-18 09:09:18 -04:00
Brad King
d9ad00119d Merge topic 'FindPkgConfig-broken-pkg-config'
1c99f5df28 FindPkgConfig: Add test for specified pkg-config tool missing
b59f36aad8 FindPkgConfig: Unset results when pkg-config is broken

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4451
2020-03-18 09:08:12 -04:00
Brad King
2d3eeffc5d Merge topic 'bootstrap-version-crlf'
2ec6fbcb9b bootstrap: Tolerate trailing content in CMakeVersion.cmake components

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4491
2020-03-18 09:07:24 -04:00
Brad King
9abc99e905 Merge topic 'FindPython-version-validation-fix' into release-3.17
cc7f116cb4 FindPython: fix regression on version validation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4492
2020-03-18 07:54:23 -04:00
Brad King
0d8e2f7ba9 Merge branch 'release-3.17' 2020-03-18 07:54:23 -04:00
Brad King
3c7774e207 Merge topic 'FindPython-version-validation-fix'
cc7f116cb4 FindPython: fix regression on version validation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4492
2020-03-18 07:54:23 -04:00
Kitware Robot
5a8eec41fc CMake Nightly Date Stamp 2020-03-18 00:01:11 -04:00
Vitaly Stakhovsky
bd89133543 cmState::GetCacheEntryValue: return cmProp 2020-03-17 12:09:20 -04:00
Marc Chevrier
cc7f116cb4 FindPython: fix regression on version validation
In commit 3dab4682f6 (FindPython: reduces consumption of resources,
2020-02-10, v3.17.0-rc1~11^2) we accidentally broke the python
executable version validation when the "LOCATION" strategy is used
with the plain `FindPython` module.  Fix the logic and add test
cases covering those combinations.

Fixes: #20465
2020-03-17 10:08:34 -04:00
Julien Marrec
46064c8193 FindRuby: Add support for versions up to 2.7
Fixes: #20370
2020-03-17 08:43:10 -04:00
Brad King
675eaf3bd0 FindRuby: Update MSVC runtime library selection
Use the `MSVC_TOOLSET_VERSION` variable computed by CMake to get the
matching Ruby library name component.

Inspired-by: Julien Marrec <julien.marrec@gmail.com>
2020-03-17 08:39:06 -04:00
Vitaly Stakhovsky
b915fec56e cmTarget: minor code improvements 2020-03-17 08:33:57 -04:00
Brad King
bee0100396 Merge topic 'file-archive'
c7e1198a23 file: Add ARCHIVE_{CREATE|EXTRACT} subcommands

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4475
2020-03-17 08:06:57 -04:00
Brad King
97562a2023 Merge topic 'property-computer'
fad0ee5404 cmTargetPropertyComputer::GetProperty: return cmProp

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4482
2020-03-17 08:06:18 -04:00
Brad King
d2e0b8bcfd Merge topic 'prop_t'
60f57d0dcc cmPropertyMap: Introduce cmProp as return type for GetProperty() functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4471
2020-03-17 08:05:29 -04:00
Brad King
2b720f6ab6 Merge topic 'mf_profiling_json'
897af4c266 cmMakefileProfilingData: Fix ambiguous conversion to Json::Value

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4479
2020-03-17 08:04:46 -04:00
Brad King
1c99f5df28 FindPkgConfig: Add test for specified pkg-config tool missing 2020-03-17 08:02:15 -04:00
Brad King
7a41bb2f5c Merge branch 'release-3.17' 2020-03-17 07:51:25 -04:00
Brad King
2e42bcdbf1 Merge topic 'FindThreads-doc'
1502f281dd FindThreads: Improve documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4480
2020-03-17 07:51:25 -04:00
Brad King
b145196bf2 Merge topic 'FindThreads-doc' into release-3.17
1502f281dd FindThreads: Improve documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4480
2020-03-17 07:51:24 -04:00
jjYBdx4IL
2ec6fbcb9b bootstrap: Tolerate trailing content in CMakeVersion.cmake components
On CYGWIN, tolerate DOS linefeeds in `Source/CMakeVersion.cmake`.
2020-03-17 07:20:09 -04:00
Kitware Robot
372f269952 CMake Nightly Date Stamp 2020-03-17 00:01:09 -04:00
Julien Marrec
b970e25d98 FindRuby: Remove extra whitespace 2020-03-16 14:07:30 -04:00
Brad King
ecdace4d61 FindRuby: Include FPHSA closer to where it is used 2020-03-16 14:07:30 -04:00
Brad King
f52f496138 FindRuby: Provide Ruby_LIBRARIES result variable
The `cmake-developer(7)` manual documents that a plural non-cached
name should be used for results.
2020-03-16 14:05:26 -04:00
Vitaly Stakhovsky
fad0ee5404 cmTargetPropertyComputer::GetProperty: return cmProp 2020-03-16 13:47:05 -04:00
Julien Marrec
b00d736a0b FindRuby: Add dedicated tests
Issue: #20370
2020-03-16 13:33:27 -04:00
Brad King
b59f36aad8 FindPkgConfig: Unset results when pkg-config is broken
Inspired-by: FUJI Goro <goro@fastly.com>
2020-03-16 12:27:11 -04:00
Rolf Eike Beer
1502f281dd FindThreads: Improve documentation
Issue: #19823
2020-03-16 11:46:38 -04:00
Brad King
6f4b1ba96d Merge topic 'define-property'
73d52a862b cmPropertyDefinition: Construct directly in defined state

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4470
2020-03-16 11:40:59 -04:00
Brad King
c6def2107f Merge topic 'gtest-parallel-xml'
32bc6aa9b6 GoogleTest: Add release note for XML_OUTPUT_DIR
0001339a6f GoogleTest: Add test case for XML_OUTPUT_DIR
e9ab39eb1d GoogleTest: Add XML_OUTPUT_DIR parameter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4433
2020-03-16 11:40:21 -04:00
Brad King
e08af3e6b8 Merge topic 'remove_trailing_whitespace'
67a592583d Source: Remove trailing whitespace from export generation code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4474
2020-03-16 11:32:14 -04:00
Brad King
eea528fd92 Merge topic 'gnu-as'
9728839b9e ASM: Fix executable link lines with GNU 'as' tool as CMAKE_ASM_COMPILER
5932f0be4f ASM: Fix depfile flags for GNU 'as' tool
0d0aa98c84 ASM: Record vendor-specific output matched to identify assembler
ee3ec27465 CMakeDetermineCompilerId: Set locale to C for vendor output match

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4460
2020-03-16 11:31:25 -04:00
Brad King
9ad554a1fc Merge topic 'FindRuby-typo'
ffa08d256f FindRuby: Fix compatibility with upper-case cache variables
50c97e1da0 FindRuby: Fix name of Ruby_LIBRARY variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4476
2020-03-16 10:07:56 -04:00
Cristian Adam
c7e1198a23 file: Add ARCHIVE_{CREATE|EXTRACT} subcommands
Fixes: #20443
2020-03-16 14:33:27 +01:00
Raul Tambre
897af4c266 cmMakefileProfilingData: Fix ambiguous conversion to Json::Value 2020-03-16 14:46:11 +02:00
Kitware Robot
eb7e8d1529 CMake Nightly Date Stamp 2020-03-16 00:01:07 -04:00
Kitware Robot
a6d95f57cc CMake Nightly Date Stamp 2020-03-15 00:01:27 -04:00
Marc Chevrier
7132540763 Merge topic 'help-source-developer-guide'
a4ca1792f6 Help: Update CMake source developer guide for C++ standard library usage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
Merge-request: !4467
2020-03-14 07:19:03 -04:00
Kitware Robot
9f3e8853f8 CMake Nightly Date Stamp 2020-03-14 00:01:09 -04:00
Marc Chevrier
a4ca1792f6 Help: Update CMake source developer guide for C++ standard library usage
We now offer many C++14, C++17, C++20, and custom extensions to the C++
standard library that are available even when compiling as C++11.
2020-03-14 12:40:13 +11:00
Brad King
ffa08d256f FindRuby: Fix compatibility with upper-case cache variables
In commit e672db628b (FindRuby: Rename variables to match case of module
name, 2020-03-11) compatibility was provided for result variables but
not for the cache entries that scripts might set.
2020-03-13 14:13:17 -04:00
Brad King
50c97e1da0 FindRuby: Fix name of Ruby_LIBRARY variable
Fix a typo in the variable name caused by commit e672db628b (FindRuby:
Rename variables to match case of module name, 2020-03-11).
2020-03-13 13:59:17 -04:00
Vitaly Stakhovsky
60f57d0dcc cmPropertyMap: Introduce cmProp as return type for GetProperty() functions
Currently properties are usually stored internally as `std::string`.
However, family of GetProperty() functions return them as `const char *` using `c_str()`.
The proposed `cmProp`, typedef'ed as `const std::string *` will expose properties
more naturally.
2020-03-13 13:32:17 -04:00