Commit Graph

33264 Commits

Author SHA1 Message Date
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 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
Brad King 22ef70499e Merge branch 'doc-cmake-server-typos' into release 2016-10-21 13:38:54 -04:00
Tobias Hunger 48189697eb Help: Fix cmake-server documentation
Some information was not updated to reflect the latest implementation.

Reported-by: Sylvain Joubert <joubert.sy@gmail.com>
2016-10-21 13:37:10 -04:00
Brad King 6bc03a285f Merge branch 'android-link-exe' into release 2016-10-21 13:26:56 -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 914874fdd1 Merge branch 'android-armeabi-c++_static' into release 2016-10-21 08:43:25 -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 876da11858 CMake 3.7.0-rc2 2016-10-19 08:53:08 -04:00
Brad King a0c539b546 Merge branch 'fix-Android-NsightTegra' into release 2016-10-18 14:24:34 -04:00
Brad King 9af881d810 Tests: Add VSNsightTegra test for VS 2015 2016-10-18 13:32:50 -04:00
Brad King 6739d24030 Tests: Fix VSNsightTegra test on Android NDK r12b
Test with architecture `armv7-a` instead of `armv7-a-hard` because the
latter is supporte supported only with NDK revisions r9c to r11c.
2016-10-18 13:32:50 -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