5952 Commits

Author SHA1 Message Date
Brad King
4aad340ec4 Merge topic 'FindBoost-no-cxx'
0369362132 FindBoost: Restore finding without CXX language enabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2663
2018-11-27 08:44:11 -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
2b427c2fad Merge topic 'FindGIF-modernize'
74cc42e937 Help: Add notes for topic 'FindGIF-modernize'
6962a41e6b FindGIF: Add test
5bc64fe6c2 FindGIF: Modernize

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2632
2018-11-21 07:41:27 -05:00
Brad King
8b83d1fdff Merge topic 'find-boost-test-version'
19d92d5e6e FindBoost: provide the version in x.y.z format
186f69cf26 FindBoost: test version variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2638
2018-11-21 07:37:11 -05:00
Brad King
a586b60129 Merge topic 'fortran-submodule-case'
ead16adfc8 Fortran: Fix module dependency scanning with upper-case SUBMODULE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2644
2018-11-21 07:34:53 -05:00
Maximilian Heinzler
6962a41e6b FindGIF: Add test
This tests whether GIFLIB can be found and the linker works. For newer
versions (>=5) it also tests if the version was parsed correctly.
2018-11-20 21:07:03 +01: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
Ben Boeckel
19d92d5e6e FindBoost: provide the version in x.y.z format 2018-11-20 10:45:24 -05:00
Ben Boeckel
186f69cf26 FindBoost: test version variables 2018-11-20 10:45:24 -05:00
Kyle Edwards
b5f8113ca7 Genex: Add policy to handle empty list items in $<IN_LIST:...>
The old behavior of $<IN_LIST:...> is inconsistent with that of
if(IN_LIST), in that it does not find an empty search item even if
the list contains empty items. This change adds a new policy to
correctly handle empty items and make the behavior more consistent
with if(IN_LIST).

Fixes: #18556
2018-11-19 17:02:06 -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
b7b2ce56a7 Merge topic 'findx11-imported-targets'
bced9d5e56 Tests/FindX11: add a test
a7d2ffb232 FindX11: add imported targets
40b3dba529 FindX11: require Freetype and Fontconfig for Xft
cc96249e2e FindX11: remove local variable from the advanced list
99489d9f10 FindX11: find Xext.h
b8b598061a FindX11: match variables with library names
6079a0d00f FindX11: fix some formatting in the documentation
3c54955d0d FindX11: use `list(APPEND)` for clearer code
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2604
2018-11-19 09:57:46 -05:00
Brad King
95a735116f Merge topic 'ctest-stdin'
86e8315482 CTest: Restore inheritance of stdin by test processes
bdec3bd896 Tests: Teach RunCMake infrastructure to optionally provide stdin

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2618
2018-11-19 09:52:07 -05:00
Ben Boeckel
bced9d5e56 Tests/FindX11: add a test 2018-11-15 13:08:18 -05:00
Brad King
1763f04281 Merge topic 'test-WriteBasicConfigVersionFile'
f3a381115f Tests: Simplify RunCMake.WriteBasicConfigVersionFile
0dbcc1afbf Tests: Factor out RunCMake.WriteBasicConfigVersionFile test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2612
2018-11-15 10:41:07 -05:00
Brad King
20aab1a4e7 Merge topic 'configure_file-canonical-deps'
6199637e95 configure_file: canonicalize input and output path in dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2586
2018-11-15 10:40:33 -05:00
Brad King
59fc717c25 Merge topic 'deprecate-findqt'
0f5c1b404b find_package(): Add policy to remove the FindQt module

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: noo mook <noomook2519@gmail.com>
Merge-request: !2554
2018-11-15 10:39:55 -05:00
Brad King
64df9ef33a Merge topic 'autogen_info_write'
e0c26406aa Autogen: Sort tests
83bbfb1d53 Autogen: Add a definitions test to the MocOnly test
01d5e5c460 Autogen: Add and use cmQtAutoGenInitializer::InfoWriter class

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2610
2018-11-15 08:38:12 -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
Kyle Edwards
0f5c1b404b find_package(): Add policy to remove the FindQt module
Removing FindQt.cmake gives Qt upstream a path forward to export its
own QtConfig.cmake files which can be found by find_package()
without having to explicitly specify CONFIG. Projects that still
want to use Qt3/4 can call find_package(Qt[34]), include(FindQt),
or add FindQt.cmake to their CMAKE_MODULE_PATH.
2018-11-14 15:05:06 -05:00
Sebastian Holtermann
e0c26406aa Autogen: Sort tests 2018-11-14 19:21:03 +01:00
Sebastian Holtermann
83bbfb1d53 Autogen: Add a definitions test to the MocOnly test 2018-11-14 19:21:03 +01:00
Brad King
ca355d92d8 Tests: Add option for custom RunCMake.XcodeProject timeout
The test has many cases and can take a long time on busy machines.
2018-11-14 11:50:36 -05:00
Brad King
f3a381115f Tests: Simplify RunCMake.WriteBasicConfigVersionFile 2018-11-14 10:46:39 -05:00
Brad King
0dbcc1afbf Tests: Factor out RunCMake.WriteBasicConfigVersionFile test
The `WriteBasicConfigVersionFile` section of the `FindPackageTest`
is independent of the rest.
2018-11-14 10:46:08 -05:00
Brad King
117272412e Merge topic 'GNUInstallDirs-FreeBSD-info'
f835f189ae GNUInstallDirs: Update FreeBSD "info" destination to share/info
4c0d97dd98 GNUInstallDirs: Split "info" and "man" default logic
1b8f0ca515 Tests: Split GNUInstallDirs expectations for FreeBSD

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Rolf Eike Beer <eike@sf-mail.de>
Merge-request: !2588
2018-11-14 08:59:19 -05:00
Frank Benkstein
6199637e95 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-13 15:01:17 -05:00
Tobias C. Berner
f835f189ae GNUInstallDirs: Update FreeBSD "info" destination to share/info
FreeBSD ports commit r484628 (Install texinfo files (GNU info) into
${PREFIX}/share/info, 2018-11-10) changed the "info" destination
from "info" to "share/info".  The commit included a patch to their
distribution of CMake to fix the `GNUInstallDirs` module too.
Apply a similar logic change to our upstream version of the module.

We already made a similar change for GNU/kFreeBSD in commit
v3.13.0-rc2~8^2 (GNUInstallDirs: Don't use BSD info and man paths on
GNU/kFreeBSD, 2018-10-21).

Fixes: #18585
2018-11-13 13:35:50 -05:00
Brad King
1b8f0ca515 Tests: Split GNUInstallDirs expectations for FreeBSD 2018-11-13 13:35:19 -05:00
Brad King
71e77972c1 Merge topic 'if_support_checking_if_cache_var_defined'
1222f02e34 If: Support the 'DEFINED CACHE{}' syntax

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2561
2018-11-13 10:29:36 -05:00
Craig Scott
ddb967cca1 Merge topic 'pie-link-options'
c4b4d8b3a6 POSITION_INDEPENDENT_CODE: Manage link flags for executables
724a0346f7 POSITION_INDEPENDENT_CODE: Fix erroneous '-fPIE' flag for Sun Studio
023188ffb4 INTERFACE_POSITION_INDEPENDENT_CODE: add generator expressions support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2465
2018-11-12 15:43:07 -05:00
Marc Chevrier
c4b4d8b3a6 POSITION_INDEPENDENT_CODE: Manage link flags for executables
Fixes: #14983, #16561
2018-11-11 17:34:09 +01:00
Sebastian Holtermann
8c8731b422 Autogen: Add test for CMAKE_GLOBAL_AUTOGEN/RCC_TARGET 2018-11-11 14:29:38 +01:00
Robert Maynard
1222f02e34 If: Support the 'DEFINED CACHE{}' syntax 2018-11-09 10:38:07 -05:00
Robert Maynard
eba7273c20 cpack: Better error message when generator doesn't exist.
Currently the CPack error message when passed an invalid generator
name  reads like the generator failed to work, rather than the
name was invalid.
2018-11-08 09:32:18 -05:00
Marc Chevrier
023188ffb4 INTERFACE_POSITION_INDEPENDENT_CODE: add generator expressions support
Fixes: #16532
2018-11-08 14:58:57 +01:00
Brad King
17e98e00c4 Merge topic 'install-defaults'
fdcd559a8e Help: Add documentation and release notes for install
9fc20a4f3e install: Add sane set of defaults for DESTINATION and file type parameters

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Acked-by: Ruslan Baratov <ruslan_baratov@yahoo.com>
Merge-request: !2558
2018-11-08 07:33:18 -05:00
Brad King
a848abe24c Merge topic 'find-jpeg-turbo-multiarch-version'
1c4c4be509 FindJPEG: handle multiarch installs of libjpeg-turbo

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2572
2018-11-08 07:30:51 -05:00
Kyle Edwards
9fc20a4f3e install: Add sane set of defaults for DESTINATION and file type parameters
If the user does not specify a DESTINATION for a target type, the
install() command checks to see if the appropriate variable from
GNUInstallDirs is set. If it is not, then it uses an appropriate
hard-coded guess.

In addition, for FILES and DIRECTORY, the user can specify a file
type instead of a DESTINATION, and the command will use the
appropriate variable from GNUInstallDirs, or a hard-coded guess if
it is not set.
2018-11-07 14:08:48 -05:00
Brad King
cf78a7df95 Merge topic 'fix-double-warn-uninitialized-in-script-mode'
53a5aec899 CMP0053: Fix double warning on uninitialized variables in -P mode
f92f93467e cmMakefile: Rename SuppressWatches to SuppressSideEffects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2565
2018-11-07 07:28:02 -05:00
Brad King
389002de96 Merge topic 'FindSQLite3-module'
fe40570608 FindSQLite3: Add module to find SQLite3

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2557
2018-11-07 07:26:46 -05:00
Ben Boeckel
1c4c4be509 FindJPEG: handle multiarch installs of libjpeg-turbo
Fedora installs a `jconfig-32.h` and `jconfig-64.h` which were not
searched. Instead, glob up all `jconfig` headers and bail once we've
found a version number.
2018-11-06 16:45:52 -05:00
Chuck Atkins
fe40570608 FindSQLite3: Add module to find SQLite3 2018-11-06 15:05:04 -05:00
Brad King
bfdd1ba604 Merge topic 'FindPostgreSQL-target'
575e2cc35d FindPostgreSQL: extract the actual version number
7413f29fe6 Tests/FindPostgreSQL: add a test for FindPostgreSQL
d2235fd253 FindPostgreSQL: add an imported target
7a801b7dfb FindPostgreSQL: Modernize documentation layout

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2555
2018-11-06 11:40:16 -05:00
Brad King
7bed050755 Merge topic 'autogen_origin_depends'
47f9c15c60 Autogen: Update <ORIGIN>_autogen target documentation
336893d9eb Autogen: Separate AUTOGEN_TARGET_DEPENDS tests into own tests suite
846043dd35 Autogen: Rename MocDepends test to AutogenOriginDependsOn
b71a9598a4 Autogen: Add test for AUTOGEN_ORIGIN_DEPENDS=OFF
f74c406501 Autogen: Add (CMAKE_)AUTOGEN_ORIGIN_DEPENDS release notes
0669de5d36 Autogen: Add (CMAKE_)AUTOGEN_ORIGIN_DEPENDS documentation
b5e895b5d4 Autogen: Add (CMAKE_)AUTOGEN_ORIGIN_DEPENDS support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2518
2018-11-06 11:38:23 -05:00
Brad King
1674a5b0a4 Merge topic 'rename-cpack-ext-generator'
20d5e77a27 CPack: Rename Ext generator to External

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2566
2018-11-06 11:30:27 -05:00
Brad King
47255060e7 Merge branch 'rename-cpack-ext-generator' into release-3.13
Merge-request: !2566
2018-11-06 11:27:41 -05:00
R2RT
53a5aec899 CMP0053: Fix double warning on uninitialized variables in -P mode
When `CMP0053` is not set to OLD or NEW then we compute both variants
in case we need to warn about a behavior change.  Do not allow both
code paths to produce an uninitialized variable warning.

Fixes: #18552
2018-11-05 08:31:09 -05:00