Commit Graph

6877 Commits

Author SHA1 Message Date
Brad King 9fd9fd9861 Merge branch 'backport-android-info-variables' into release 2016-11-18 10:05:00 -05:00
Brad King ea8eba0bbf Android: Add CMAKE_<LANG>_ANDROID_TOOLCHAIN_MACHINE
Expose the binutils' machine name (typically used as a prefix on the
tool names) publicly.  This is expected to match the `gcc -dumpmachine`
value.

Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
2016-11-18 10:03:15 -05:00
Brad King 0d3eb139e1 Android: Add CMAKE_ANDROID_NDK_TOOLCHAIN_HOST_TAG variable
The NDK provides prebuilt toolchain files in directories named for the
host architecture.  The NDK build system calls this `HOST_TAG`.
Expose the value publicly for use by clients that need to pass it
to external tools.

Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
2016-11-18 10:03:07 -05:00
Brad King 236d6244a0 Android: Always set CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION
When this variable is not set by the user or toolchain file, set it to
the default selected.  This will be useful for client code that needs to
pass the value to an external tool that needs to find the same toolchain
in the NDK.  Leave it empty for a standalone toolchain.

Suggested-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
2016-11-18 10:02:57 -05:00
Brad King 4cddb46e64 Merge branch 'armcc-response-file-flag' into release 2016-11-15 10:13:37 -05:00
Ben Boeckel d608e85cfe ARMCC: Fix flag used for response files
ARMCC does not use the `@` sigil to indicate response files, but instead
the `--via=` flag. See the documentation here:

    http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0491h/CHDCIEGC.html

Fixes: #16425
2016-11-15 09:31:33 -05:00
Brad King c087072e21 FindBISON: Do not rebuild every time when not VERBOSE
Since commit v3.7.0-rc1~348^2~3 (FindBISON: Change usage of [VERBOSE
<file>] to [VERBOSE [<file>]], 2016-07-16) we always list the VERBOSE
output file as an output of our custom command even if the option is not
used.  This causes the rule to re-run every time (e.g. with Ninja).
Revert one hunk from that change (that looks incorrect) to fix it.

Closes: #16426
2016-11-14 10:06:48 -05:00
Florent Castelli 61898de641 PkgConfig: Fix FindPkgConfig imported target feature
The options to the find_library call to create the imported target
used a literal string "HINTS /path NO_DEFAULT_PATH" instead of a
list of options. This resulted in never finding any library in my
testing.
2016-11-04 23:35:27 +01:00
Brad King 8b75290f13 Merge branch 'cpackifw-search-algorithm' into release 2016-11-03 09:30:29 -04:00
Konstantin Podsvirov 20cc76c93a CPackIFW: Update search to find QtIFW distributed with QtSDK
Also avoid CMP0007 warnings.
2016-11-03 09:28:15 -04:00
Brad King 5f7f0ab517 Merge branch 'FindHDF5-restore-default-C' into release 2016-11-02 09:07:53 -04:00
Brad King ff3ccc1f23 FindHDF5: Restore pre-3.6 behavior of finding only C by default
Refactoring in commit v3.6.0-rc1~72^2 (HDF5: Rework component searching
to correctly find HL for all bindings, 2016-05-12) changed the default
behavior from finding only the C bindings to finding everything for the
enabled languages.  Restore the original behavior for compatibility and
because many projects need only the C bindings.

Closes: #16397
2016-11-02 09:06:56 -04:00
Brad King 2857ca89a2 Merge branch 'cpack-doc-typos' into release 2016-11-02 08:44:22 -04:00
Brad King 503766fa0e Merge branch 'fix-macos-sysroot' into release 2016-11-02 08:44:16 -04:00
Alex Turbov 4ab3b0c462 CPackRPM: Fix incorrect variable name in documentation
`CPACK_RPM_COMPONENT_INSTALL` is the correct variable to set to enable
component packaging.  `CPACK_RPM_PACKAGE_COMPONENT` is just set to a
component name when CPack calls corresponding installer.
2016-11-02 08:42:56 -04:00
Alex Turbov e6460e7d40 CPackDeb: Fix incorrect variable name in documentation
`CPACK_DEB_COMPONENT_INSTALL` is the correct variable to set to enable
component packaging.  `CPACK_DEB_PACKAGE_COMPONENT` is just set to a
component name when CPack calls corresponding installer.
2016-11-02 08:42:44 -04:00
Alex Turbov c75b8910a4 CPackDeb: fix copy-n-paste typos in documentation 2016-11-01 10:13:20 -04:00
Gregor Jasny 935041908d Darwin: Remove deployment target version check
Starting with Xcode 8 the SDK folder also contains an unversioned entry:

    MacOSX.sdk
    MacOSX10.12.sdk -> MacOSX.sdk

If this unversioned path is used CMake cannot detect the SDK version.

Furthermore, querying the SDK version via

    xcodebuild -sdk <sysroot> -version Path

gives bogus results for the Command Line Tools installed into `/`.

The OS X deployment target version and SDK version are not as tied as
they once were, so this check is now more trouble than it is worth.
Simply remove it.

Closes: #16323
2016-11-01 09:37:49 -04:00
Gregor Jasny 542d52f95e Revert "Xcode: Convert maybe unversioned OSX sysroot into versioned SDK path"
Revert commit v3.7.0-rc1~48^2 (Xcode: Convert maybe unversioned OSX
sysroot into versioned SDK path, 2016-09-25).  The replacement of
`else()` with `if(CMAKE_OSX_SYSROOT)` defeats the prior handling of
`if("x${CMAKE_OSX_SYSROOT}" MATCHES "/")`. This causes the combination

    -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING="" -DCMAKE_OSX_SYSROOT:STRING=/

to not be honored and `-isysroot` to be emitted as a compiler flag
universally.  We will need another solution to the problem the
now-reverted commit was meant to address.

Closes: #16394
2016-11-01 09:31:08 -04:00
Brad King 77413bc5db Merge branch 'FindMatlab-fix-typo' into release 2016-10-28 15:20:30 -04:00
Matthew Woehlke f2de70799c FindMatlab: Fix typo in matlab_add_unit_test implementation
Fix typo in variable used to communicate between matlab_add_unit_test
and its helper script MatlabTestsRedirect.cmake that was introduced in
commit v3.7.0-rc1~116^2 (FindMatlab: Extend matlab_add_unit_test to run
arbitrary test code, 2016-08-30).
2016-10-28 15:19:24 -04:00
Brad King 1e574618b2 Merge branch 'FindMatlab-9.1' into release 2016-10-28 10:42:23 -04:00
Francesco Romano e29f33cd20 FindMatlab: Add support for Matlab 2016b (9.1) 2016-10-28 10:41:43 -04:00
Brad King 075cc0f28c Merge branch 'intel-17-features' into release 2016-10-26 09:22:13 -04:00
Brad King 554b4f9010 Features: Record features for Intel C++ 17 on UNIX
Issue: #16384
2016-10-26 09:18:38 -04:00
Brad King de21e564ed Merge branch 'intel-compile-features-windows' into release 2016-10-24 14:36:46 -04:00
Brad King 881585f975 Intel: Fix compiler extension flags on Windows
The extension flags enabled by commit v3.6.0-rc1~120^2~1 (Features:
Record standard flags for Intel C/C++ on Windows, 2016-04-18) of the
form `-Qstd=gnu++11` are not supported by the Intel C/C++ Compiler for
Windows.  Fall back to using the non-extension form of the flags.

Issue: #16384
2016-10-24 14:29:40 -04:00
Brad King 4c272adbe1 Android: Link position-independent executables with proper flags
Add `-fPIE -pie` to the default executable link flags when
`CMAKE_POSITION_INDEPENDENT_CODE` is enabled.  This is required by
Android 16 and above for executables to run on the device.

Closes: #16382
2016-10-24 11:45:18 -04:00
Brad King 6205f1797e Android: Set CMAKE_POSITION_INDEPENDENT_CODE automatically
If the toolchain file or cache does not set this, enable it
automatically based on the Android API version.  Versions 16
and above expect position independent code.

Use the main `CMAKE_POSITION_INDEPENDENT_CODE` setting in favor of
hard-coding `-fpic` or `-fPIC` in the compiler flags for each ABI.
This allows CMake to use `-fpie` or `-fPIE` as needed when sources
are meant for executables, and `-fpic` or `-fPIC` for other sources.
2016-10-24 11:40:53 -04:00
Brad King 295c8efa35 Android: Add missing link flags for device executables
See `${ndk}/build/core/default-build-commands.mk` for link flags the NDK
uses for executables.  Add them to our default executable link flags.
Suppress `nocopyreloc` on `arm64-v8a` because it does not work with
some STL types.

Closes: #16380
2016-10-21 10:43:45 -04:00
Brad King 43f4326ece Android: Fix support for armeabi with c++_static
Add missing "unwind" and "atomic" libraries needed for this combination.
See `${ndk}/sources/cxx-stl/llvm-libc++/libs/armeabi/libc++.a` for the
libraries the NDK uses.

Issue: #16380
2016-10-21 08:42:25 -04:00
Brad King a0c539b546 Merge branch 'fix-Android-NsightTegra' into release 2016-10-18 14:24:34 -04:00
Brad King 06c396126f VS: Fix NVIDIA Nsight Tegra Visual Studio Edition support
The guard added by commit v3.7.0-rc1~229^2~17 (Android: Suppress new
functionality with Nsight Tegra in VS IDE builds, 2016-06-02) to
`Modules/Platform/Android-Determine.cmake` does not work in that
location because `CMAKE_VS_PLATFORM_NAME` is not set until after the
module is loaded.  Change this particular guard to test for the Visual
Studio generator instead.  If in the future we add support for using
Visual Studio for Android without Nsight Tegra then something more will
be needed, but this is good enough for now.

Closes: #16371
2016-10-18 13:32:50 -04:00
Brad King e3cb3116bc Merge branch 'external-project-source-subdir-usage' into release 2016-10-18 12:56:13 -04:00
Ben Boeckel 615f3ed2b4 ExternalProject: make SOURCE_SUBDIR directly appendable
This allows it to be used in expansions without being conditional based
on its value.
2016-10-18 12:51:38 -04:00
Ben Boeckel fdce782b61 ExternalProject: error out only if the property is unset
Property values may be empty; instead make sure they exist and allow for
empty values.
2016-10-18 12:51:06 -04:00
Brad King df68d8a17e Merge branch 'FindwxWidgets-unversioned-library-path' into release 2016-10-17 11:07:37 -04:00
Brad King 52e8fa2312 FindwxWidgets: Fix finding unversioned VS-built directory prefixes
The change in commit v3.7.0-rc1~217^2 (FindwxWidgets: Add VS-versioned
library directory prefixes, 2016-08-24) works only for official
wxWidgets builds that add the VS-versioned directory prefixes.  Local
wxWidgets builds still have an unversioned prefix.  Search them.

Closes: #16366
2016-10-17 11:06:00 -04:00
Brad King b6e5b6485f Merge branch 'osx-no-deployment-target-on-cross-compile' into release 2016-10-17 10:04:29 -04:00
Gregor Jasny e8bafb6fcb OS X: Do not try to set deployment target when cross-compiling
The change in commit v3.4.0-rc2~6^2 (Xcode: Adjust deployment target SDK
version to host version, 2015-10-11) does not make sense when
cross-compiling.  Make it conditional to fix this regression in some
cross-compiling cases.

Closes: #16355
2016-10-17 10:02:17 -04:00
Brad King 1a64962b7c Merge branch 'ice-3.6.3' into release 2016-10-13 08:20:08 -04:00
Roger Leigh 6e5a3655ca FindIce: Add support for version 3.6.3 2016-10-13 08:19:27 -04:00
Brad King acd2eab2f3 Merge branch 'ExternalProject-fix-CMAKE_CACHE_ARGS-list' into release 2016-10-10 14:49:10 -04:00
Max Smolens a3c98cb30e ExternalProject: Fix regression in passing list to CMAKE_CACHE_ARGS
Fix passing a list to the CMAKE_CACHE_ARGS and CMAKE_CACHE_DEFAULT_ARGS
options of ExternalProject_Add.

Following commit v3.7.0-rc1~273^2~1 (prefer list(APPEND) over
string(APPEND) where appropriate, 2016-08-08), the semicolon list
separator after the first list element was missing in the generated
cache.
2016-10-10 14:40:12 -04:00
Brad King a033f86712 Merge branch 'FindProtobuf-fix-subdirs' into release 2016-10-07 10:16:33 -04:00
Brad King 111d90465f Merge branch 'android-cxxabi' into release 2016-10-07 10:16:28 -04:00
Brad King 8cdac469d1 Android: Fix support for cxxabi.h with libc++
Additional include directories are needed for this on some STL types.

Closes: #16350
2016-10-07 09:53:51 -04:00
Martin Joly 2b9dad694a FindProtobuf: Fix protobuf_generate_*() to handle subdirs
The change in commit v3.7.0-rc1~513^2 (FindProtobuf: fix
protobuf_generate_*() to handle proto files in subdirs, 2016-06-09)
incorrectly adds subdirectories to the path of the generated files when
`*.proto` files are passed to `protobuf_generate_*` with subdirectories.
This behavior is not correct when `PROTOBUF_GENERATE_CPP_APPEND_PATH` is
True (default behavior) as `protoc` will generate output file in the
current build directory.
2016-10-07 09:50:52 -04:00
Brad King ffff5c17a5 Merge branch 'android-ndk-r13' into release 2016-10-06 13:28:14 -04:00
Brad King 0c3a04777c Android: Update libc++ include directories for NDK r13
The Android NDK r13 moved the libc++ include directories.

Closes: #16346
2016-10-06 13:26:40 -04:00