Commit Graph

33275 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 afb4a224be Merge branch 'cmake-server-fix-16423' into release 2016-11-14 11:24:56 -05:00
Tobias Hunger 516a2cd360 server-mode: Reset GlobalGenerator before configure
This is what cmake-gui also does to avoid CMake crashing on repeated
attempts to configure it.

Fixes #16423.
2016-11-14 11:06:37 -05:00
Brad King 04dce5f965 Merge branch 'cmake-server-fix-16422' into release 2016-11-14 10:19:12 -05:00
Tobias Hunger d0a707b3d0 server-mode: Prevent possible crash when watching directories
The `filename` passed by libuv may be `nullptr`, so handle that
explicitly.

Fixes: #16422
2016-11-14 10:18:44 -05:00
Brad King 7f0470cabc Merge branch 'FindBISON-fix-rebuild' into release 2016-11-14 10:14:13 -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
Brad King 5cfc2e926a CMake 3.7.0 2016-11-11 09:24:18 -05:00
Brad King dc083f9534 Merge branch 'autorcc-only-no-rebuild' into release 2016-11-09 11:26:04 -05:00
Brad King e4232b82e6 QtAutogen: Do not re-generate AUTORCC outputs on every build
Refactoring in commit v3.6.0-rc1~134^2~10 (Autogen: Split out moc file
generation code to dedicated method, 2016-04-18) removed the
unconditional creation of the `<target>_automoc.cpp` file.  Now it is
generated only when `AUTOMOC` is enabled.  However, if this file is not
created then our internal `GenerateAll` setting is enabled on every
build, causing `AUTORCC` to re-generate its file(s) every time.  Fix the
`GenerateAll` setting to be used only for when autogen settings change.
The old logic was left from when we had only automoc.

Closes: #16413
2016-11-09 11:22:07 -05:00
Brad King 51112aaa18 Merge branch 'pkgconfig_imported_target' into release 2016-11-08 09:48:33 -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 adf5f253ec CMake 3.7.0-rc3 2016-11-04 08:30:22 -04: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 c555eca9ba Merge branch 'doc-cmake-qt-fixes' into release 2016-11-02 08:52:23 -04:00
Thiago M. de C. Marques 1c52e6511f Help: Update example Qt 5 find_package call to add missing component
Running CMake on it caused the following error:

    error: Target "publisher" links to target "Qt5::DBus" but the target
    was not found.  Perhaps a find_package() call is missing for an
    IMPORTED target, or an ALIAS target is missing?

Add the missing DBus component.
2016-11-02 08:51:57 -04:00
Marcus D. Hanwell 4c802a326b Help: Update example Qt 5 find_package call to use COMPONENTS 2016-11-02 08:51:53 -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 a316f5fd6d Merge branch 'cmake-server-handshake-improvements' into release 2016-10-28 08:27:21 -04:00
Tobias Hunger 42ccbee11c server-mode: Handle generator toolset and platform in handshake 2016-10-28 13:46:15 +02:00
Tobias Hunger d792491c40 cmake-server: Better error reporting during handshake
Catch more problematic input during handshake and report failure.

These were caught before when trying to configure, but it is way better
to get these reports early.
2016-10-27 14:18:42 -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 4ec0329bf1 Merge branch 'cmake-server-message-quoting' into release 2016-10-24 14:36:50 -04:00
Brad King de21e564ed Merge branch 'intel-compile-features-windows' into release 2016-10-24 14:36:46 -04:00
Brad King 9b8dc79cc8 cmake-server: Change message wrapper to avoid ambiguity with content
Change our message wrapper from

    [== CMake Server ==[ ... ]== CMake Server ==]

to

    [== "CMake Server" ==[ ... ]== "CMake Server" ==]

to guarantee that no JSON content can ever contain the ending string
(because it would be encoded as `]== \"CMake Server\" ==]`).
2016-10-24 14:36:13 -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 69a7309ceb Merge branch 'android-pic' into release 2016-10-24 13:50:10 -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 6cd02f08c7 Merge branch 'backport-ninja-subdir-binary-dir' into release 2016-10-24 10:31:14 -04:00
Alexis Murzeau 42db2ebc75 Ninja: Use binary dir for `$subdir/all` targets
The targets added by commit v3.6.0-rc1~240^2~2 (Ninja: Add `$subdir/all`
targets, 2016-03-11) use as `$subdir` the relative path from the top of
the source tree to the current source directory.  This is not correct
when using `add_subdirectory(test test_bin)`.  Instead we need to use
the relative path from the top of the binary tree to the current binary
directory as was done for related targets by commit v3.7.0-rc1~268^2
(Ninja: Add `$subdir/{test,install,package}` targets, 2016-08-05).
2016-10-24 09:49:23 -04:00