Commit Graph

40946 Commits

Author SHA1 Message Date
Brad King d9dd68cb60 macOS: Restore compatibility for setting FRAMEWORK after install()
The `FRAMEWORK` target property affects the way the `install()` command
treats the target and so should be set first.  Our implementation
assumed that this was always the case and led to an assertion failure.
Prior to CMake 3.12 this was visible only when using an explicit
`LIBRARY ... NAMELINK_ONLY` option, but commit 0212d7c762 (install: add
NAMELINK_COMPONENT argument, 2018-04-18, v3.12.0-rc1~139^2~3) made
it possible with a simple `LIBRARY DESTINATION`.

Fully supporting out-of-order specification will require non-trivial
refactoring to defer install generator creation to generate time.
For now simply restore the old behavior of installing the framework
to the library destination.

Fixes: #18848
2019-01-29 12:49:53 -05:00
Brad King 8887ebc69b CMake 3.13.3 v3.13.3 2019-01-14 07:27:44 -05:00
Brad King c63a19e920 Merge branch 'cmake-option-parsing' into release-3.13
Merge-request: !2799
2019-01-14 07:24:36 -05:00
Craig Scott 27eb7c5bdb cmake: Ensure source and binary dirs are set
If only the source dir is provided, the binary dir is assumed
to be the working directory. If only the binary dir is provided
and it doesn't yet have a CMakeCache.txt to provide the
source dir, then the source dir is assumed to be the working
directory. This logic was not previously being handled
correctly when -S and/or -B options were involved.
Furthermore, when both were missing, no suitable error
message was provided and an empty string was used for
the build directory.

Fixes: #18707
2019-01-14 07:13:28 +11:00
Craig Scott a1adbc7243 cmake: Stop processing if -P option lacks file name
While an error message was being logged, processing was
continuing nonetheless except with the -P argument omitted.
This could have allowed unintended effects if the remaining
arguments formed a valid set of command line options.
2019-01-14 07:13:27 +11:00
Brad King ddb5b097cd Merge branch 'backport-autogen_noqt_warning' into release-3.13
Merge-request: !2787
2019-01-11 11:25:59 -05:00
Brad King dd39da5518 Tests: Add case for warning when AUTOMOC/UIC/RCC gets disabled 2019-01-11 08:28:42 -05:00
Sebastian Holtermann 5ae69f5919 Autogen: Issue a warning when AUTOMOC/UIC/RCC gets disabled.
We used to silently disable AUTOMOC/UIC/RCC when no valid Qt
version was found.  This patch introduces the generation of
a warning message in that case.

Closes #18732.
2019-01-10 16:48:28 +01:00
Brad King 91fa6a472c Merge branch 'cmake-CDU-option-parsing' into release-3.13
Merge-request: !2783
2019-01-10 09:34:14 -05:00
Brad King 2ec3363ea5 Tests: Add cases for -{C,D,U} without a source tree 2019-01-10 21:19:26 +11:00
Paul Seyfert 6d53a60f00 cmake: distinguish '-Cpath' from '-C path' in source dir parsing
This results in the correct source directory being picked up in calls
with

    cmake sourcedir -C settings

and in a more appropriate error message when calling

    mkdir build ; cd build ; cmake -C settings

Also fix `-D` and `-U` in the same way.
2019-01-10 21:19:24 +11:00
Craig Scott 88c710ab56 Merge branch 'feature/fix-link_resolved_item_into_bundle' into release-3.13
Merge-request: !2728
2019-01-10 08:39:33 +11:00
Brad King 68bc9fcbb9 Merge branch 'vs2017-skip-2019' into release-3.13
Merge-request: !2775
2019-01-08 14:13:33 -05:00
Brad King d44f81c217 VS: Exclude VS 2019 instances when using VS 2017 generator
Filter instances reported by the VS Installer to consider only VS 2017
instances for the "Visual Studio 15 2017" generator.

Fixes: #18721
2019-01-08 14:10:16 -05:00
Tim Blechmann 200bf57742 BundleUtilities: Ensure target dir exists when creating symlinks
Commit v3.13.0-rc1~279^2 (GetPrerequisites: Move dylibs from MacOS
to Frameworks folder in bundle, 2018-07-22) introduced a regression
that can cause symlink creation to fail during packaging. Symlinks
can be created before targets are installed, so the destination
directory of the symlink sometimes won't exist at symlink creation.

Fixes: #18726
2019-01-08 19:56:34 +11:00
Brad King 9bbfbd54ba CMake 3.13.2 v3.13.2 2018-12-13 06:44:30 -05:00
Brad King 78e72efc9c Merge branch 'cuda-arch-turing' into release-3.13
Merge-request: !2724
2018-12-10 09:20:50 -05:00
Anton Chernov 7a5a8eb0c5 CUDA: Add CUDA 10 (Turing) detection 2018-12-10 09:15:58 -05:00
Brad King 3b4e86f26d Merge branch 'backport-autogen_revert_implicit_includes' into release-3.13
Merge-request: !2709
2018-12-07 08:04:55 -05:00
Brad King 0becea2d60 Merge branch 'cpack-status-callback' into release-3.13
Merge-request: !2696
2018-12-07 08:04:21 -05:00
Sebastian Holtermann 187481d4d9 Autogen: Revert passing compiler implicit includes to moc
Passing an incomplete list of compiler include directories causes
a regression in the KIO project (and probably others). We need to
disable it until the complete list is available (see #16291).

Fixes: #18669
Issue: #18041
2018-12-07 07:56:46 -05:00
Nils Gladitz 4a3ae1710e CPack/External: Fix status messages of staging scripts
Set progress callback on cmake instance used by CPack.  The progress
callback is used to output STATUS messages which are otherwise missing
when issued from e.g. CPack External staging scripts.

Fixes: #18567
2018-12-07 07:33:30 -05:00
Brad King 45c95a3327 Merge branch 'cuda-external' into release-3.13
Merge-request: !2704
2018-12-05 14:48:20 -05:00
Brad King 7b74213461 CUDA: Fix crash on linking to a CUDA target without CUDA enabled
Do not try to device link or add CUDA runtime libraries if the language
is not enabled.

Fixes: #18673
Issue: #18614
2018-12-05 14:45:19 -05:00
Brad King 6294296906 CMake 3.13.1 v3.13.1 2018-11-28 06:49:16 -05:00
Brad King 0f0c8a2c7d Merge branch 'autogen_uic_empty_fix_3_13' into release-3.13
Merge-request: !2667
2018-11-27 08:45:58 -05:00
Sebastian Holtermann b1b5004c1a Autogen: Fix empty uic executable string
In CMake 3.13.0 when a target has ``AUTOUIC`` enabled but doesn't
link against Qt5Widgets, the uic executable string is empty and
an error string "The uic executable \"\" does not exist" is generated.
In CMake 3.12 ``AUTOUIC`` was silently disabled instead.
This patch fixes the regression and restores the behavior of CMake 3.12.

Fixes: #18630
2018-11-27 08:21:40 -05:00
Brad King 2cf836fa5e Merge branch 'vs2015-no-sdk' into release-3.13
Merge-request: !2656
2018-11-26 13:48:22 -05:00
Harry Mallon f54d28a838 VS: Avoid crash with VS 2015 when all SDKs are higher than 10.0.14393.0
Move the filter added by commit v3.13.0-rc1~72^2~2 (VS: Do not select a
Windows SDK too high for current VS version, 2017-08-07, committed
2018-09-17) to before our check that the remaining list is empty.
Otherwise we crash when dereferencing the first entry of an empty
vector.

Also add a comment explaining where 10.0.14393.0 came from.

Fixes: #18633
2018-11-26 13:42:50 -05:00
Brad King 1f531e0428 Merge branch 'FindBoost-no-cxx' into release-3.13
Merge-request: !2663
2018-11-26 13:18:16 -05:00
Brad King 0369362132 FindBoost: Restore finding without CXX language enabled
Since commit v3.13.0~7^2 (FindBoost: Improve compiler prefix
detection for GCC 5+ and clang 4+, 2018-11-07) we run the internal
`_Boost_COMPILER_DUMPVERSION` macro on all UNIX platforms.  Teach
the macro to tolerate missing `CMAKE_CXX_COMPILER_VERSION`, which
occurs when the CXX language is not enabled.

Fixes: #18624
2018-11-26 13:13:58 -05:00
Brad King 8068850fcc Merge branch 'fortran-submodule-case' into release-3.13
Merge-request: !2644
2018-11-20 14:19:20 -05:00
Brad King ead16adfc8 Fortran: Fix module dependency scanning with upper-case SUBMODULE
The lexical token expression added by commit v3.7.0-rc1~73^2~1 (Fortran:
Add support for submodule syntax in dependency scanning, 2016-09-05)
has a typo and does not match upper-case `B` in `SUBMODULE`.  Fix it.

Fixes: #18595
2018-11-20 14:16:26 -05:00
Brad King 05a2ca7f87 CMake 3.13.0 v3.13.0 2018-11-20 09:31:28 -05:00
Brad King a5241cc3a7 Merge branch 'blas-pkgcfg' into release-3.13
Merge-request: !2631
2018-11-19 15:47:59 -05:00
Martin von Gagern a3c31effed FindBLAS: Restore BLAS_FOUND when found using pkgconfig
Refactoring in commit v3.12.0-rc1~92^2 (FindPkgConfig: export the list
of found libraries also as variable, 2018-05-11) dropped use of FPHSA
to set `BLAS_FOUND`.  Set it explicitly instead.
2018-11-19 15:47:20 -05:00
Brad King 3e1c361afa Merge branch 'FindPython-lib-arch' into release-3.13
Merge-request: !2624
2018-11-19 15:37:05 -05:00
Marc Chevrier c24f29c664 FindPython: Ensure config tool matches library architecture 2018-11-19 15:36:26 -05:00
Brad King d3fa2e7400 Merge branch 'irsl-ucrt-version' into release-3.13
Merge-request: !2637
2018-11-19 13:32:13 -05:00
Brad King 01c7d9ce86 IRSL: Detect versioned Windows Universal CRT directories
Windows SDK version 10.0.17763.0 now places the uCRT libraries in a
versioned directory.

Fixes: #18603
2018-11-19 13:31:40 -05:00
Brad King e593161bd5 Merge branch 'backport-configure_file-canonical-deps' into release-3.13
Merge-request: !2635
2018-11-19 10:14:26 -05:00
Frank Benkstein 57701227d6 configure_file: canonicalize input and output path in dependencies
Represent the input file path internally in canonical form.  Otherwise
multiple `configure_file` calls that share the same input file but specify
it relative to different directories (e.g. via `../`) result in multiple
copies of the dependency on the rule to re-run CMake.  This causes the
Ninja generator to emit duplicate phony build statements for these
dependencies, which generates an error with `-w dupbuild=err`, which
will be default in Ninja 1.9.

Also canonicalize the output path for consistency.

Add a test case.

Fixes: #18584
2018-11-19 10:11:12 -05:00
Brad King d684090470 Merge branch 'ctest-stdin' into release-3.13
Merge-request: !2618
2018-11-15 10:18:00 -05:00
Brad King 86e8315482 CTest: Restore inheritance of stdin by test processes
Since commit v3.11.0-rc1~117^2 (CTest: Re-implement test process
handling using libuv, 2017-12-10) we do not give the child test
processes any stdin.  Prior to that change we let the child test
processes inherit stdin from ctest itself.  Tests that run serially
might be able to use the real stdin meaningfully, so restore that
behavior and add a test case.

Fixes: #18591
2018-11-15 08:08:56 -05:00
Brad King bdec3bd896 Tests: Teach RunCMake infrastructure to optionally provide stdin 2018-11-15 08:08:56 -05:00
Brad King ad6ef6c1d5 Merge branch 'FindBoost-1.69' into release-3.13
Merge-request: !2601
2018-11-13 10:37:23 -05:00
Roger Leigh 5045cd82d0 FindBoost: Additional fixes for 1.69 2018-11-13 10:37:01 -05:00
Brad King abe1a345b2 Merge branch 'FindBoost-compiler-guess-update' into release-3.13
Merge-request: !2579
2018-11-09 11:53:31 -05:00
Mateusz Łoskot b71667a395 FindBoost: Improve compiler prefix detection for GCC 5+ and clang 4+
Add recognition of compiler version and prefix for clang.
Accommodate changes to version numbering scheme for GCC 5+ and clang 4+
 - Minor number becomes patch, so excluded it from compiler prefix.
 - Improves searching for Boost 1.69+ libraries built with GCC 5+ and
   clang 4+, where library names are generated with compiler tag based on
   major version only eg. -gcc5 for GC 5.5.0 or -clang6 for clang 6.0.0
 - Follows up related changes in upcoming Boost 1.69
   https://github.com/boostorg/build/pull/349
Dump detected compiler version in Boost_DEBUG message.
Replace use of CMAKE_COMPILER_IS_GNUCXX with CMAKE_CXX_COMPILER_ID.
2018-11-09 11:52:43 -05:00
Brad King 51bf23ed74 Merge branch 'asm-compiler-id-clang' into release-3.13
Merge-request: !2584
2018-11-09 11:45:30 -05:00