Commit Graph

24722 Commits

Author SHA1 Message Date
Brad King 7787fb6e3e Merge branch 'fix-csharp-target-type' into release-3.12
Merge-request: !2427
2018-10-02 14:58:57 -04:00
Brad King 375b420fdf CSharp: Fix regression in VS project type selection
A that target contains only `.cs` sources should be generated as a
`.csproj` project even if it links to non-CSharp static libraries.
The latter case was broken by refactoring in commit v3.12.0-rc1~160^2~7
(remove TargetIsCSharpOnly() and use methods from cmGeneratorTarget,
2018-03-19).  The reason is that the `HasLanguage` method added by
commit v3.12.0-rc1~239^2~6 (cmGeneratorTarget: add HasLanguage() as
wrapper for GetLanguages(), 2018-03-19) enforces its "exclusive" check
on the combined set of source file languages and the link language.
To restore the original `TargetIsCSharpOnly` semantics, update
`HasLanguage` to enforce exclusiveness only on the list of sources.

Fixes: #18239
2018-10-02 14:58:11 -04:00
Brad King 8b21aa0af0 VS: Fix CSharp flag selection when linking to a static C++ library
When a CSharp target links to a static C++ library, CMake will compute
the link language as C++ instead of CSharp.  That may be incorrect and
needs further investigation, but it does not affect how VS drives C#
linking.  However, it does break our flag language selection logic
and causes C++ flags to be used for CSharp.  In particular, this
drops the `-platform:x86` flag on 32-bit builds.

Fix this by always selecting the CSharp flags when generating a
`.csproj` project type.

Issue: #18239
2018-10-02 14:58:11 -04:00
Brad King 3eda5cdd93 Merge branch 'fix-ctest_start-track' into release-3.12
Merge-request: !2366
2018-09-10 14:35:59 -04:00
Kyle Edwards 09f0325eaf CTest: Fix regression in ctest_start()
The format for the TAG file was changed in 3.12, and the way it was
read caused a regression which changed how the track was decided. This
commit fixes the regression.

Fixes #18347.
2018-09-10 14:31:21 -04:00
Brad King 292ec157b6 CTest: Fix --test-load regression
The `ctest --test-load` option is implemented in `StartNextTests` by not
starting any tests when the load is too high and instead sleeping and
then returning.  Prior to commit v3.11.0-rc1~117^2 (CTest: Re-implement
test process handling using libuv, 2017-12-10) our outer loop in
`RunTests` would immediately call `StartNextTests` again.  However, now
the `uv_run` loop may simply terminate if there are no tests running
because no events are left pending.

Fix this by converting the sleep in `StartNextTests` into a libuv timer
that it starts instead.  This avoids leaving `uv_run` with no pending
events.  In the case that there are other running tests this also allows
CTest to detect when they finish even if it during the wait period where
we previously slept.

This regression was not caught by the test suite because it only
verified that we do not start new tests when the load was too high and
not that we proceed to start tests when the load drops.  Revise the test
suite to cover both.

Fixes: #18338
2018-09-10 07:32:16 -04:00
Brad King f478fa633d CMake 3.12.2 2018-09-07 06:40:49 -04:00
Brad King 925b95fbad Merge branch 'vs-CMakeLists.txt' into release-3.12
Merge-request: !2349
2018-09-05 14:33:06 -04:00
Brad King 0b82e68f2f VS: Restore CMakeLists.txt references in each target
The custom command de-duplication added by commit v3.12.0-rc1~171^2 (VS:
Generate a custom command only in the least dependent target,
2018-03-23) accidentally also applied to the `CMakeLists.txt` file
reference we put in each target.  This file reference comes with a
custom command that has no dependencies and that is safe to run
repeatedly across multiple targets (via internal stamp checking).
Therefore it should be excluded from the de-duplication so that
`CMakeLists.txt` references appear in all targets for human reference.

Fixes: #18310
2018-09-05 14:32:45 -04:00
Brad King 8a3cba5257 Merge branch 'state-reset-glob' into release-3.12
Merge-request: !2278
2018-08-23 14:17:31 -04:00
Craig Scott dbd3e2c53d EXPORT_PROPERTIES: Prevent null dereference for undefined property
Fixes: #18260
2018-08-16 22:22:13 +10:00
Shane Parris 6f3b9e8b95 cmState: Clear GlobVerificationManager state on Reset
It should not persist across multiple configure rounds.

Fixes: #18208
2018-08-09 13:03:50 -04:00
Brad King c4ab098097 CMake 3.12.1 2018-08-09 08:06:18 -04:00
Craig Scott 5041298893 Merge branch 'project-injected-no-cmp0048' into release-3.12 2018-07-25 22:24:29 +10:00
Brad King 6646771b0f project: Do not issue CMP0048 warnings on injected call
Fixes: #18202
2018-07-24 13:14:10 -04:00
Brad King 492ade276b Help: Add explicit <PackageName>_ROOT variable documentation
Add documentation for both the CMake variable and environment variable
of this name pattern.  Update references to these names to link to their
documents.  Clarify the pattern used to construct their names.
2018-07-20 09:43:08 -04:00
Brad King f84c15ef2f CMake 3.12.0 2018-07-17 07:18:36 -04:00
Brad King 7f1569d2d8 CMake 3.12.0-rc3 2018-07-09 08:06:27 -04:00
Brad King 855dafdda0 Merge branch 'csharp-link-file' into release-3.12
Merge-request: !2177
2018-07-09 07:32:35 -04:00
Robert Dailey 8a6107650e VS: Only link cs files when they're not in binary dir
When `*.cs` files are provided, do not generate a `<Link>` element in
the `.csproj` project if those files are descendants of
`CMAKE_CURRENT_BINARY_DIR`. This comparison happens for each file.
2018-07-06 09:45:15 -04:00
Brad King 84ecbf44b6 Merge branch 'revert-subdirectory-linking' into release-3.12
Merge-request: !2191
2018-07-03 12:54:32 -04:00
Brad King 0d7114987c Revert "target_link_libraries: Allow use with targets in other directories"
Revert commit v3.12.0-rc1~82^2 (target_link_libraries: Allow use with
targets in other directories, 2018-05-11).  The RHS target scoping and
visibility rules are not clear and will need further investigation
before the feature can be added.

Issue: #17943
2018-07-03 09:39:28 -04:00
Andrew Fuller 2774259100 CPack/Deb: Restore setting of root as the owner of files
Refactoring in commit v3.10.0-rc1~220^2 (cmCPackDebGenerator: Use
libarchive to create .deb file) accidentally broke this for the
top-level archive.
2018-07-02 13:17:43 -04:00
Brad King 51e7d41507 CMake 3.12.0-rc2 2018-06-29 09:03:08 -04:00
Brad King decfdec63f Merge branch 'ctest_submit-https' into release-3.12
Merge-request: !2171
2018-06-27 15:10:56 -04:00
Zack Galbreath 71f27c04b0 ctest_submit: show headers as debug info
Hide any headers specified by `ctest_submit(HTTPHEADER ...)` unless ctest
is run with --debug.  This option is used to present bearer tokens to CDash.
We do not want to inadvertently expose this secret data in the console
output log.
2018-06-27 15:08:14 -04:00
Zack Galbreath 4464ef21da ctest_submit: Check CA file during CDASH_UPLOAD
This fixes a bug where ctest(SUBMIT CDASH_UPLOAD ...) would fail when
attemping to submit to a site bearing a genuine SSL certificate.
This code path was missing a call to cmCurlSetCAInfo() which loads
the certificate authority file.
2018-06-27 15:08:14 -04:00
Brad King 2ba71a11e3 Merge branch 'lexer-null' into release-3.12
Merge-request: !2174
2018-06-26 13:04:25 -04:00
Brad King b29842a818 ListFileLexer: Do not match null bytes in input
Extend the fix from commit v3.10.0-rc1~188^2 (ListFileLexer: fix
heap-buffer-overflow on malicious input, 2017-08-26) to apply to all
lexer token matches.  Replace all `.` with `[^\0\n]`.  Update all
`[^...]` match expressions to not match `\0`.

We cannot safely process null bytes in strings.

Fixes: #18124
2018-06-26 11:54:34 -04:00
Brad King 7e283acde7 Merge branch 'libuv-new-version-file-location' into release-3.12
Merge-request: !2169
2018-06-25 10:17:38 -04:00
Raphael Kubo da Costa 889033b5c6 FindLibUV: Also check uv/version.h for version detection
Starting with libuv 1.21.0, libuv's headers were moved into a uv/ directory.
Make FindLibUV aware of the file's new location for configuration to work.
2018-06-25 10:16:46 -04:00
Brad King 00523ad9c5 Merge branch 'vs-filter-default-toolset' into release-3.12
Merge-request: !2162
2018-06-25 09:39:30 -04:00
Basil Fierz 3c4698da3a VS: Allow toolset version selection to specify default toolset
Teach the feature added by commit v3.12.0-rc1~38^2 (VS: Add option to
select the version of the toolset used by VS 2017, 2018-05-19) to accept
the default toolset version in addition to older versions.  If the
default toolset version is supplied, simply clear it so the default will
be used.

Fixes: #18107
2018-06-24 10:36:03 -04:00
Basil Fierz b759f7068f cmVSSetupHelper: Expose default toolset version
We already detect the VS toolset version.  Expose it to clients.
2018-06-22 10:07:09 -04:00
Brad King d548994afc cmVSSetupHelper: Use in-class member initialization 2018-06-22 10:07:09 -04:00
Brad King 221f8aa7e2 Merge branch 'file-GLOB-remove-new-errors' into release-3.12
Merge-request: !2164
2018-06-22 09:42:07 -04:00
Brad King 142a625729 file: Drop error cases added by CMake 3.12.0-rc1 to avoid regressions
Refactoring in commit v3.12.0-rc1~418^2~3 (Refactor HandleGlobCommand,
2018-02-13) introduced error diagnostics for argument combinations that
were previously accepted.  Restore acceptance to avoid regressing
projects that used those combinations even if they do not make sense.

Fixes: #18097
2018-06-22 09:39:05 -04:00
Brad King ecbaed7ad6 Merge branch 'vs-cuda-no-host-includes' into release-3.12
Merge-request: !2158
2018-06-20 09:45:26 -04:00
Brad King 735529f505 Merge branch 'vs-cuda-maxrregcount' into release-3.12
Merge-request: !2156
2018-06-20 09:45:08 -04:00
Brad King 543b6826ee VS: Avoid duplication of CUDA include directories
We already place all include directories for CUDA inside `CudaCompile`
so we do not need to use any from `ClCompile`.  Tell `CudaCompile`
not to use the host compiler's include directory settings.

Fixes: #18101
2018-06-20 09:44:18 -04:00
Brad King 4d3a3d7459 VS: Add CUDA flag table entry for -maxrregcount
Fixes: #18104
2018-06-20 09:44:09 -04:00
Gregor Jasny 057ecb8f6f C++ feature checks: Ignore Xcode warnings 2018-06-19 10:56:50 -04:00
Gregor Jasny 985d3a162c Xcode: Use legacy build system
Closes: #18099
2018-06-19 10:56:50 -04:00
Brad King bc5bcad45e Xcode: Detect architecture(s) using ARCHS instead of CURRENT_ARCH
Xcode 10 no longer populates `CURRENT_ARCH` with the current
architecture in shell scripts and instead uses `undefined_arch`.
Instead we must use `ARCHS`.  It lists all architectures separated by
spaces.

Fixes: #18085
2018-06-18 13:44:43 -04:00
Brad King ef5e2e8a62 Merge branch 'sphinx-info' into release-3.12
Merge-request: !2146
2018-06-13 10:52:11 -04:00
Brad King 985c78c7e1 Merge branch 'restore-windows-resources-through-link' into release-3.12
Merge-request: !2147
2018-06-13 10:52:01 -04:00
Brad King 4e6ff0ae24 Windows: Restore support for running CMake through a symlink
The change in commit v3.11.3~3^2 (cmSystemTools: Revert GetRealPath
implementation on Windows, 2018-05-29) broke the feature added by commit
v3.11.0-rc1~64^2 (Windows: Add support for running CMake tools through a
symlink, 2018-01-21).  Use `GetRealPathResolvingWindowsSubst` in the
latter code path to restore it.

Fixes: #17882
2018-06-12 11:15:50 -04:00
Orivej Desh 276e369813 Utilities/Sphinx: Add option to build and install Info manual
Add option `SPHINX_INFO` to enable the Sphinx 'texinfo' builder and use
the `makeinfo` tool to convert it to a `.info` file.
2018-06-12 10:25:37 -04:00
Brad King c984bf668b Merge branch 'ninja-win-rsp' into release-3.12
Merge-request: !2136
2018-06-08 09:32:14 -04:00
Matthijs Kool 88365838b8 Ninja: Use native slashes to pass rsp files
Some tools on Windows (e.g. Embarcadero linkers) can't handle forward
slashes in paths to rsp files.
2018-06-08 09:31:23 -04:00