7670 Commits

Author SHA1 Message Date
Brad King
d70ef7eff6 Merge branch 'FindBoost-fix-policy-scope' into release-3.9
This has no corresponding merge-request because the branch was
made as a direct fixup specific to 3.9.
2017-09-27 06:13:53 -04:00
Brad King
ed44b56a12 FindBoost: Finish reverting "Simplify search in lists" for 3.9
In commit v3.9.2~3^2 (FindBoost: Revert "Simplify search in lists.",
2017-09-05) we forgot to also revert commit commit v3.9.1~15^2
(FindBoost: pop policy stack before returning, 2017-07-24) which had
been made as a fixup to the original commit.

Fixes: #17309
2017-09-27 06:09:21 -04:00
Roger Leigh
ee1f890332 FindBoost: Add support for Boost 1.65.0 and 1.65.1 to CMake 3.9
Backport the changes from commit fa114e7d70 (FindBoost: Add Boost 1.65
dependencies, 2017-08-22) and commit dbba53a5aa (FindBoost: Add version
1.65.1, 2017-09-06) to CMake 3.9.

Fixes: #17289
2017-09-18 08:57:18 -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
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
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
Brad King
9d09d1a922 Merge branch 'android-plain-sysroot' into release-3.9
Merge-request: !1101
2017-08-03 12:47:11 -04:00
Brad King
68d67c827f Android: Fix support for CMAKE_SYSROOT without CMAKE_SYSROOT_COMPILE
If `CMAKE_SYSROOT` is set by the user (e.g. via the toolchain file) then
we do not set `CMAKE_SYSROOT_COMPILE` to our default.  Fix our
references to the sysroot's `/usr/include` directory to use
`CMAKE_SYSROOT_COMPILE` only if it is set and else `CMAKE_SYSROOT`.

Fixes: #17096
2017-08-03 12:03:59 -04:00
Brad King
1181ad61d2 Merge branch 'UseSWIG-Java-enabled' into release-3.9
Merge-request: !1095
2017-08-02 11:56:07 -04:00
Brad King
b4fbf677bb UseSWIG: Fix when Java is enabled as a language
Since commit v3.8.0-rc1~251^2 (UseSWIG: Record generated java files as
custom command outputs, 2016-11-28) the generated `.java` files are
listed as sources in the call to `add_library` by swig_add_library.
They are listed only as the outputs of custom commands and not intended
for compilation as part of the library.

Reported-by: Alan W. Irwin <irwin@beluga.phys.uvic.ca>
2017-08-02 11:52:36 -04:00
Brad King
39bd20a490 Merge branch 'FindJava-fix-1.6-registry' into release-3.9
Merge-request: !1079
2017-08-02 11:31:27 -04:00
Rechi Rechi
5479074be1 FindJava: fix hint for windows jre 1.6
Fix typo in commit v3.8.0-rc1~112^2 (FindJava: add hints for jre,
2017-01-11).
2017-08-02 11:30:48 -04:00
Craig Scott
f71f1943db Merge branch 'FindJava_earlyAccessDebian' into release-3.9
Tested-by: Felix Geyer <debfx@fobos.de>
Merge-request: !1080
2017-08-02 11:15:42 -04:00
Cristian Adam
eddbd62d0f FindBoost: pop policy stack before returning
CMake would give a fatal error if the policy stack was cleaned up
upon exiting the module.
2017-07-27 07:49:48 +10:00
Craig Scott
e42fa012b6 Allow early access version trailing string to be mixed case
The original regex was expecting to match strings like "ea", but it has
been reported that other strings like "Debian" are also possible.
2017-07-25 22:35:45 +10:00
Brad King
9d9085ab36 Merge branch 'ninja_cuda_export_compile_commands_support' into release-3.9 2017-07-13 11:40:08 -04:00
Robert Maynard
712af07e47 CUDA: CMAKE_EXPORT_COMPILE_COMMANDS now works with CUDA and Ninja
Fixes: #17061
2017-07-13 11:23:16 -04:00
Brad King
4bafa3922e Android: Always add standard include directories last
The logic added in commit v3.6.0-rc1~30^2 (Add a variable to specify
language-wide system include directories, 2016-05-24) to use
`CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES` incorrectly filters them by
`CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES`.  Rather than recognizing
this, commit v3.8.0-rc1~60^2 (Android: Pass sysroot include directory
explicitly, 2017-01-20) worked around the problem by incorrectly
removing `/usr/include` from `CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES`
so it worked in `CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES`.

By not filtering out `/usr/include` from user-specified include
directories, we allow the code

    include_directories(${CMAKE_SYSROOT}/usr/include)

to place the include directory too early on the command line.

Fix support for standard include directories to not be filtered by
implicit include directories, and do not remove `/usr/include` from the
list of implicit include directories for Android builds.  Add a test
case to verify that an explicit `/usr/include` is ignored in favor
of the standard directory at the end.

Fixes: #17059
2017-07-13 10:03:58 -04:00
Brad King
e8e38aea26 Merge branch 'android-fix-c++_shared' into release-3.9 2017-07-12 08:39:55 -04:00
Brad King
e0fb3f314f Android: Link to android_support with c++_shared
The NDK has done this in `build/core/definitions.mk` since r13
(r12 and below do so only for c++_static).
2017-07-12 08:39:42 -04:00
Robert Dailey
796b8fcb14 FindDoxygen: Create DOXYGEN_OUTPUT_DIRECTORY if it doesn't exist
If the doxygen output directory does not exist, create it prior to
running the doxygen commands.
2017-07-06 10:00:28 -05:00
Robert Dailey
97a9a35607 FindDoxygen: Use a stable reference to the location of global resources
FindDoxygen generates some files based on the version of Doxygen whose
content will not vary across a project and are therefore a global
resource that can be shared by all calls to `find_package(Doxygen)` and
to `doxygen_add_docs`.  We currently use `${PROJECT_BINARY_DIR}` to
reference their location, but this is not stable because `project()`
calls in a subdirectory can change it.  Use `${CMAKE_BINARY_DIR}`
instead.

Reviewed-by: Craig Scott <craig.scott@crascit.com>
Fixes: #17022
2017-06-29 13:39:26 -05:00
Brad King
7f1fd07b19 Merge branch 'FindDoxygen-internal-var' into release-3.9 2017-06-27 10:48:30 -04:00
Brad King
d194bd915b FindDoxygen: Add private prefix to internal variables
Since commit v3.9.0-rc1~55^2 (Improve Doxygen support, 2017-04-10) we
accidentally leave a non-prefixed internal `result` variable set.
This may interfere with project code.  Add a prefix to avoid this.
2017-06-27 10:45:45 -04:00
Brad King
c24e665613 Merge branch 'GetPrerequisites-ucrt-no-warn' into release-3.9 2017-06-26 10:34:02 -04:00
Brad King
23451a66ac GetPrerequisites: Do not warn about non-absolute UCRT system libraries
Issue: #17007
2017-06-26 10:33:16 -04:00
Brad King
04b2fc08b4 GCC,Clang: Mark CMAKE_<LANG>_COMPILER_{AR,RANLIB} as advanced 2017-06-22 11:33:54 -04:00
Brad King
5ba09a75a2 Merge branch 'android-unified-headers' into release-3.9 2017-06-22 09:52:23 -04:00
Brad King
5d31793023 Android: Fix include path for unified headers
In commit v3.9.0-rc3~3^2 (Android: Add support for unified headers,
2017-06-12) we accidentally constructed the unified header include
directories from the linking sysroot.  Construct them from the
compiling sysroot instead.

Fixes: #16584
2017-06-22 08:28:44 -04:00
Brad King
61c1848cdc Merge branch 'ipo-per-lang' into release-3.9 2017-06-14 15:10:39 -04:00
Brad King
ba247ccaba IPO: Consider support for each language separately
We only define `INTERPROCEDURAL_OPTIMIZATION` behavior for C, CXX, and
Fortran languages.  Do not try to enable support for other languages.
Furthermore, each language builds with a different compiler, so check
for support by CMake and the compiler for each language independently.

Fixes: #16944
2017-06-14 10:36:57 -04:00