Commit Graph

36443 Commits

Author SHA1 Message Date
Brad King 53f15b730a Merge branch 'backport-genex-SOURCES-test' into release-3.9 2017-09-07 12:12:04 -04:00
Brad King 1167360b99 Tests: Fix RunCMake.GeneratorExpression to run in CMake 3.9
CMake 3.9 does not have CMP0070, so port away from it for that branch.
2017-09-07 12:08:34 -04:00
Brad King 80420d3c01 Merge branch 'backport-irsl-vs15-future' into release-3.9
Merge-request: !1240
2017-09-06 11:47:50 -04:00
Brad King 1dd2c08b19 InstallRequiredSystemLibraries: Add support for future VS 2017 toolchains
Assume that all cl 19.xx versions will use the same runtime DLL pattern.

Suggested-by: Tomasz Słodkowicz <slodki@users.noreply.github.com>
2017-09-06 11:36:47 -04:00
Brad King 55c4b6818e Merge branch 'FindBoost-fix-policy-scope' into release-3.9
Merge-request: !1238
2017-09-05 14:10:32 -04:00
Brad King ade45fa342 FindBoost: Revert "Simplify search in lists."
Revert commit v3.9.0-rc1~41^2 (FindBoost: Simplify search in lists,
2017-04-23).  It regressed the module by exposing issue #17257, but the
fix for that issue is not suitable for inclusion in a patch release.
It is simplest to revert the commit until the larger problem can be
addressed.

Fixes: #17252
2017-09-05 14:04:51 -04:00
Brad King dfc11d71bd Merge branch 'android-ndk-r16' into release-3.9
Merge-request: !1237
2017-09-05 12:54:45 -04:00
Brad King 5a1a1177bf Android: Update for NDK r16
Since NDK commit 90ec78ffd96b87cd75d82575587ead14d6494df1 (Remove Clang
toolchain path from setup.mk, 2017-05-31) the `setup.mk` files for Clang
no longer hold the path to the `toolchains/llvm` directory.  It has been
the same since NDK r11, so use that as the default.

Fixes: #17253
2017-09-05 12:52:09 -04:00
Brad King 27816fa741 Merge branch 'csharp_fix_initial_flags' into release-3.9
Merge-request: !1232
2017-09-05 09:58:53 -04:00
Michael Stürmer a3388900f8 VS: Initialize CSharp flags consistently
Use the same environment variable for the initial flags that we
use for the compiler id.

Fixes: #17250
2017-09-05 09:58:43 -04:00
Brad King 741eca9c6c Merge branch 'findopenmp-found' into release-3.9
Merge-request: !1233
2017-09-05 09:54:55 -04:00
Christian Pfeiffer 91fbda8247 FindOpenMP: Restore OpenMP_FOUND result variable
The overhaul in commit v3.9.0-rc1~207^2~1 (FindOpenMP: Complete
overhaul, 2017-04-24) documented this variable but accidentally left it
unset.

Fixes: #17251
2017-09-05 09:54:48 -04:00
Brad King 2ce84615f1 Merge branch 'backport-vs-csharp-ref-no-asm' into release-3.9
Merge-request: !1203
2017-09-05 09:43:24 -04:00
Michael Stürmer 7e57e6ae12 VS: Do not reference output assemblies if not possible for CSharp target
Since commit v3.9.0-rc4~4^2 (Vs: allow CSharp targets to be linked to
CXX targets, 2017-06-20) CSharp targets get `ProjectReference` entries
to their dependencies.  This causes VS to also reference the
dependency's output assembly by default, which is incorrect for
non-managed targets.

Fix this by setting `ReferenceOutputAssembly` to `false` for targets
that can't provide output assemblies.  Unmanaged C++ targets (shared
libs & executables) can still be referenced and a warning will be shown
in the IDE but the build will not break anymore.

Fixes: #17172
2017-09-05 09:41:40 -04:00
Brad King 2820de210b Merge branch 'fix-genex-SOURCES' into release-3.9
Merge-request: !1218
2017-09-01 10:24:12 -04:00
Brad King 068cc545d9 Genex: Fix TARGET_PROPERTY value of SOURCES
Refactoring in commit v3.8.0-rc1~445^2~2 (cmTarget: Move sanity checks
and computed property access to callers, 2016-10-13) exposed a typo in
commit v3.8.0-rc1~445^2~3 (cmGeneratorTarget: Implement
cmTargetPropertyComputer interface, 2016-10-13).  Together they broke
the `$<TARGET_PROPERTY:mytgt,SOURCES>` generator expression in the case
that the `SOURCES` target property is populated in part by the
`target_sources` command.  Add the missing `;`-separator.

Fixes: #17243
2017-09-01 10:23:37 -04:00
Brad King 2990799227 Merge branch 'fix-find-package-mode' into release-3.9
Merge-request: !1208
2017-08-29 15:33:24 -04:00
Brad King 18454ea44d cmake: Fix --find-package mode with imported targets
The change in commit v3.9.0-rc1~116^2~6 (cmakemain: use script role for
-P, 2017-05-11) accidentally left project commands out of find-package
mode, causing packages that provide imported targets to break.

Fixes: #17124
2017-08-29 15:30:07 -04:00
Brad King 05840793fd Merge branch 'cpack-dmg-iwyu' into release-3.9
Merge-request: !1206
2017-08-29 11:26:59 -04:00
Brad King 8c51dbdd9b cmCPackDragNDropGenerator: Add missing include
We use `std::sort` and so must include `<algorithm>`.

Issue: #17233
2017-08-29 11:24:36 -04:00
Brad King e498dad3f2 Merge branch 'revert-xcode-9-new-buildsystem-support' into release-3.9
Merge-request: !1183
2017-08-24 11:43:06 -04:00
Brad King 9ecee256f8 Xcode: Revert addition of "outputPaths" to custom command build phase
The change in commit v3.9.0~3^2 (Xcode: Add "outputPaths" to custom
command script build phase, 2017-07-13) was meant to support Xcode 9's
new build system.  However, without matching "inputPaths", Xcode will
not re-run the build phase if its outputs have already been generated.
This broke the old Xcode build system too.

Revert the change for now so at least the old Xcode build system works.
Further investigation will be needed to add proper support for Xcode 9's
new build system.

Fixes: #17178
2017-08-24 10:56:48 -04:00
Brad King 6fd0c72115 Merge branch 'ninja-cl-intl' into release-3.9
Merge-request: !1179
2017-08-23 11:36:35 -04:00
Brad King de9840d1b8 Ninja: Fix support for MSVC with non-English output
With MSVC the Ninja generator extracts the `cl -showIncludes` prefix.
When MSVC is configured to have non-English output, e.g. via
`VSLANG=2052` in the environment, then `cl` prints the prefix encoded
for the current code page, which is not necessarily UTF-8 encoding.
Currently we fail to convert the prefix to our internal UTF-8 encoding,
but assume it is UTF-8 later.

While writing `rules.ninja`, the Ninja generator converts our internal
UTF-8 encoding to the current code page.  The `msvc_deps_prefix =` line
needs to be encoded as the current code page so that `ninja` can match
in the output from `cl -showIncludes` during the build.

Prior to commit v3.9.0-rc1~47^2 (codecvt: Re-implement do_out and
do_unshift, 2017-05-25), the non-UTF-8 prefix extracted above was
written without noticing its incorrect internal encoding.  The
`rules.ninja` file was successfully written, but possibly with a mangled
`msvc_deps_prefix`.  Since that commit the output stream correctly
rejects the non-UTF-8 byte sequence and writing `rules.ninja` fails.

Fix this by correctly converting the `cl -showIncludes` output from the
current code page to our internal UTF-8 encoding.

Fixes: #17191
2017-08-23 11:10:41 -04:00
Brad King 02645aa6ae Merge branch 'InstallRequiredSystemLibraries-vs15.3' into release-3.9
Merge-request: !1168
2017-08-22 07:30:30 -04:00
Brad King 3f17ccce1c Merge branch 'revert-macos-hidpi-qt-dialog' into release-3.9
Merge-request: !1167
2017-08-22 07:30:20 -04:00
Brad King 286c75f7f0 macOS: Revert default Hi-DPI support in applications
This reverts commit v3.9.0-rc1~287^2 (macOS: Enable Hi-DPI support in
applications by default, 2017-04-08).  It breaks iOS applications that
do not use their own `MACOSX_BUNDLE_INFO_PLIST` because `NSApplication`
is only for macOS apps.  Until more complete support for iOS is added
to CMake (e.g. with a different default plist file) we must allow
our default plist file to work for both macOS and iOS.

Fixes: #17179
2017-08-22 07:29:20 -04:00
Brad King 23cf9e152f InstallRequiredSystemLibraries: Find VS 2017 Update 3 redist directory
Add compiler version 19.11 to our table.

Fixes: #17184
2017-08-21 11:59:33 -04:00
Brad King b45d8432c2 InstallRequiredSystemLibraries: Factor redist name into variable
Store the `VC###` component of the `Microsoft.VC###.CRT` directory name
in a variable set based on the toolchain version.  Its naming convention
is changed by VS 15.3.
2017-08-21 11:59:31 -04:00
Brad King f78228dfd5 Merge branch 'debian_clang_binutils' into release-3.9
Merge-request: !1127
2017-08-15 14:53:58 -04:00
Sylvain Joubert 630235bd9e Clang: Find version-suffixed LLVM/Clang binutils
Debian renames all LLVM/Clang binaries with a version suffix to allow
multiple versions to be installed at the same time.  While there is a
version-agnostic package that adds a symlink to provide the standard
binary names, if only the versioned packages are installed, binaries
must be found as `binary-x.y`.  In any case, using the same version of
the `binutils` as the compiler seems better.
2017-08-15 14:51:44 -04:00
Brad King d4b8a6b9d6 Merge branch 'cuda-device-link-ccbin' into release-3.9
Merge-request: !1138
2017-08-15 14:47:21 -04:00
Maikel van den Hurk fe45d13a0e CUDA: Pass host compiler to nvcc while device linking 2017-08-15 14:46:11 -04:00
Brad King 752ab27292 Merge branch 'backport-FindCygwin-fix-regression' into release-3.9
Merge-request: !1128
2017-08-15 14:00:59 -04:00
Brad King 1622848efc Merge branch 'backport-autogen-autouic-lookup' into release-3.9
Merge-request: !1140
2017-08-15 14:00:29 -04:00
Tibor Szabo 62930253a3 FindCygwin: Fix regression when CYGWIN_INSTALL_PATH is already set
The change in commit v3.9.0-rc1~54^2 (FindCygwin: Use find_program
instead of find_path, 2017-05-18) broke cases when `CYGWIN_INSTALL_PATH`
is already set, e.g. on the command-line or by an earlier call to
`find_package(Cygwin)`.  Since `find_program` now finds the actual
`cygwin.bat` file, use a separate cache entry to save the location
and then compute `CYGWIN_INSTALL_PATH`.  If `CYGWIN_INSTALL_PATH`
is already set, use that to avoid `find_program` having to search.
2017-08-15 13:53:10 -04:00
Sebastian Holtermann fb5db079a7 Autogen: Extend AUTOUIC search paths test 2017-08-15 13:22:18 +02:00
Sebastian Holtermann d8a99dd2ea Autogen: Update AUTOUIC documentation for search paths 2017-08-15 12:57:32 +02:00
Sebastian Holtermann 02e6c54813 Autogen: Restore AUTOUIC lookup paths from 3.8.2
When encountering an `#include "<PATH>ui_<BASE>.h"` statement,
search for `<BASE>.ui` in
 - <SOURCE_DIR>/<BASE>.ui
 - <SOURCE_DIR>/<PATH><BASE>.ui
 - <AUTOUIC_SEARCH_PATH>/<BASE>.ui
 - <AUTOUIC_SEARCH_PATH>/<PATH><BASE>.ui

In CMake 3.8.2 the lookup list was
  - <SOURCE_DIR>/<BASE>.ui

In CMake 3.9.[01] the lookup list was
 - <SOURCE_DIR>/<PATH><BASE.ui>
 - <AUTOUIC_SEARCH_PATH>/<PATH><BASE>.ui

Closes #17168
2017-08-15 12:17:37 +02:00
Brad King fca4423786 CMake 3.9.1 v3.9.1 2017-08-10 09:36:24 -04:00
Brad King c94c6bae72 Merge branch 'doc-CMP0069-typos' into release-3.9
Merge-request: !1122
2017-08-10 09:27:30 -04:00
Brad King 8c0afd2c75 Merge branch 'find-package_root-disable' into release-3.9
Merge-request: !1116
2017-08-10 09:27:19 -04:00
Ruslan Baratov 8d56308c44 Help: Fix module and function names in CMP0069 examples
Fixes: #17153
2017-08-10 09:03:49 -04:00
Brad King 578d95f87d find_*: Disable the PACKAGE_ROOT search path group for CMake 3.9
Disable the feature added by commit v3.9.0-rc1~71^2~2 (find_*: Add a new
PackageRoot search path group, 2017-05-03) and remove documentation
added by commit v3.9.0-rc1~71^2 (find_*: Add docs for PackageRoot search
path group, 2017-05-03).  Unfortunately the name `<pkg>_ROOT` may
already be set by projects for their own incompatible purposes.  Disable
the behavior change for now to fix the regression for CMake 3.9.  We can
restore it later with a policy.

In order to keep the implementation and tests working, add an
undocumented variable we can use in the tests to enable the behavior
before the policy is introduced.

Fixes: #17144
2017-08-08 11:52:28 -04:00
Brad King 2610c1a733 Merge branch 'autogen-create-include-dir' into release-3.9
Merge-request: !1113
2017-08-08 10:10:09 -04:00
Brad King 9e2a8afb57 Merge branch 'find-package_root-test-regex' into release-3.9
Merge-request: !1115
2017-08-08 08:26:58 -04:00
Brad King 6e5ad2716f Merge branch 'update-expat' into release-3.9
Merge-request: !1110
2017-08-08 08:26:44 -04:00
Brad King e574bce15b Tests: Simplify RunCMake.find_package PackageRoot case regexes 2017-08-08 08:23:57 -04:00
Sebastian Holtermann 6a0605c711 Autogen: Always create AUTOMOC/AUTOUIC include directory
The **AUTOGEN** include directory was always passed to the compiler but
only generated on demand. To avoid compiler complaints when using
`-Wmissing-include-dirs` make sure the directory gets created always.

Closes #17147
2017-08-08 12:11:10 +02:00
Brad King e4ea628b42 expat: Update CMake build for 2.2.3 2017-08-07 10:22:13 -04:00