Commit Graph

43364 Commits

Author SHA1 Message Date
Brad King
1069a3f02b Configure CMake itself with policies through CMake 3.14
In particular, set `CMP0082` to `NEW` to interleave install commands
in the top-level directory with subdirectory installations.
2019-05-08 13:18:30 -04:00
Brad King
0af57a1852 Merge topic 'autogen_cache'
7d50e1c611 Autogen: Refactor AUTOMOC and AUTOUIC and add source file parse data caching

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3290
2019-05-08 12:41:15 -04:00
Craig Scott
4aace9b015 Merge topic 'ctest-update-version-override'
2a34d0ac36 ctest: Add new variable CTEST_UPDATE_VERSION_OVERRIDE
7ddac95121 Help: cross-ref and wording of docs related to ctest_update()
a0d04d8810 testing: Update terminology in ctest_update tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Zack Galbreath <zack.galbreath@kitware.com>
Merge-request: !3277
2019-05-08 08:49:34 -04:00
Kitware Robot
afd7df9d1c CMake Nightly Date Stamp 2019-05-08 00:01:05 -04:00
Brad King
fa077acba5 Merge topic 'enforce-explicit-use-of-project'
1527defbfe cmMakefile: Enforce explicit use of project() command

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3245
2019-05-07 11:17:26 -04:00
Brad King
be132dc6a6 Merge topic 'findmpi-debug'
c499eccc5c FindMPI: Make tests valid C89 by returning 0
521ea77fc0 FindMPI: Correct documentaiton for library version
c672a6a4b9 FindMPI: Add error logging

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3289
2019-05-07 11:16:07 -04:00
Brad King
707c180ff0 Merge topic 'CTestCoverageCollectGCOV-updates'
41d262bd3d CTestCoverageCollectGCOV: run gcov with -x
911b97867b CTestCoverageCollectGCOV: run gcov only once

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3258
2019-05-07 11:15:18 -04:00
Brad King
50c6204d26 Merge topic 'use_intel_mkl_blas_intface_on_osX'
8527dbbf44 FindBLAS: Use Intel fortran interface on OS X even with GNU Fortran

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3286
2019-05-07 11:14:20 -04:00
Brad King
ccb12f93c7 Merge branch 'release-3.14' 2019-05-07 11:13:35 -04:00
Brad King
1628e4677a Merge topic 'touch-after-ranlib'
f83e4359f2 Apple: Preserve high resolution mtime for static libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3283
2019-05-07 11:12:38 -04:00
Zack Galbreath
2a34d0ac36 ctest: Add new variable CTEST_UPDATE_VERSION_OVERRIDE
Set this in a CTest script to explicitly define what the current revision
will be reported as in Update.xml.
2019-05-07 10:45:47 -04:00
Sebastian Holtermann
7d50e1c611 Autogen: Refactor AUTOMOC and AUTOUIC and add source file parse data caching
New features
------------

CMake's `AUTOMOC` and `AUTOUIC` now cache information extracted when parsing
source files in `CMakeFiles/<ORIGIN>_autogen.dir/ParseCache.txt`.
This leads to faster `<ORIGIN>_autogen` target rebuilds, because source files
will be parsed again only if they're newer than the `ParseCache.txt` file.
The parse cache will be recomputed if it is older than the CMake executable.

`AUTOMOC` and `AUTOUIC` now check if `moc` or `uic` output files are older
than the `moc` or `uic` executable.  If an output file is older than the
compiler, it will be regenerated.  Therefore if a new `moc` or `uic` version
is installed, all output files will be regenerated.

`AUTOMOC` and `AUTOUIC` error and warning messages are more detailed.

Internal changes
----------------

`moc` and `uic` output file names are not computed in the `_autogen`
target anymore but in `cmQtAutoGenInitializer`.  This makes the available at
the configuration stage for improved dependency computations (to be done).

In `AutogenInfo.cmake`, equally sized lists for "source file names",
"source file flags" and "compiler output file names" are passed to the
`_autogen` target.  This replaces the separate file lists for
`AUTOMOC` and `AUTOUIC`.

Files times are read from the file system only once by using `cmFileTime`
instances instead of `cmQtAutoGenerator::FileSystem::FileIsOlderThan` calls.

All calls to not thread safe file system functions are moved to non concurrent
fence jobs (see `cmWorkerPool::JobT::IsFence()`).  This renders the
`cmQtAutoGenerator::FileSystem` wrapper class obsolete and it is removed.

Instead of composing a single large settings string that is fed to the
`cmCryptoHash`, now all setting sub strings are fed one by one to the
`cmCryptoHash` and the finalized result is stored.

The `std::mutex` in `cmQtAutoGenerator::Logger` is tagged `mutable` and most
`cmQtAutoGenerator::Logger` methods become `const`.

Outlook
-------

This patch provides the framework required to

- extract dependencies from `.ui` files in `AUTOUIC`.
  These will help to address issue
  #15420 "AUTOUIC: Track uic external inputs".

- generate adaptive `make` and `ninja` files in the `_autogen` target.
  These will help to address issue
  #16776 "AUTOUIC: Ninja needs two passes to correctly build Qt project".

- generate (possibly empty) `moc` and `uic` files for all headers instead of a
  `mocs_compilation.cpp` file.
  This will help to address issue
  #17277 "AUTOMOC: Provide a option to allow AUTOMOC to compile individual "
         "moc_x.cxx instead of including all in mocs_compilation.cxx"
2019-05-07 12:42:19 +02:00
Marc Chevrier
37bf503db2 Merge topic 'docs-static-lib-link-options'
a6a543ced6 Help: Clarify that link options don't apply to static library targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3285
2019-05-07 04:15:46 -04:00
Kitware Robot
9bf6cbc8f7 CMake Nightly Date Stamp 2019-05-07 00:01:05 -04:00
Christian Pfeiffer
c499eccc5c FindMPI: Make tests valid C89 by returning 0 2019-05-06 18:42:28 +02:00
Christian Pfeiffer
521ea77fc0 FindMPI: Correct documentaiton for library version 2019-05-06 18:42:02 +02:00
Christian Pfeiffer
c672a6a4b9 FindMPI: Add error logging 2019-05-06 18:40:44 +02:00
Brad King
6ced0b97d5 Merge branch 'touch-after-ranlib' into release-3.14
Merge-request: !3283
2019-05-06 09:45:21 -04:00
Brad King
c6f6e2b305 Merge branch 'release-3.14' 2019-05-06 09:40:12 -04:00
Brad King
aae79c2d70 Merge topic 'FindPython-fix-Python_RUNTIME_LIBRARY_DIRS-variable'
34c0293532 FindPython: ensure variable Python_RUNTIME_LIBRARY_DIRS is set correctly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3287
2019-05-06 09:33:45 -04:00
Brad King
f0185ff14a Merge topic 'fix_ios_try_compile'
275b6b3194 iOS: Fix try_compile FILE_COPY not to fail

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3272
2019-05-06 09:32:25 -04:00
Brad King
6399e2246f Merge branch 'FindPython-fix-Python_RUNTIME_LIBRARY_DIRS-variable' into release-3.14
Merge-request: !3287
2019-05-06 09:26:05 -04:00
Brad King
2951d71111 Merge branch 'fix_ios_try_compile' into release-3.14
Merge-request: !3272
2019-05-06 09:25:53 -04:00
Alexandru Croitor
275b6b3194 iOS: Fix try_compile FILE_COPY not to fail
When building for iOS, the compiled target is placed into a bundle.
If a single-configuration generator is used, like Makefiles or Ninja,
the try_compile FILE_COPY behavior fails to find the bundle, because
it only looks for the bundle inside a Debug subfolder (presumably
to support a multi-configuration generator like Xcode).

Consider looking for the bundle in the root try_compile folder, as
well as in the location specified by CMAKE_TRY_COMPILE_CONFIGURATION.

Closes: #19211
2019-05-06 09:23:27 -04:00
Brad King
1820c7e780 Merge topic 'SWIG'
e3919bae17 UseSWIG: Manage alternate library name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3241
2019-05-06 09:19:38 -04:00
Brad King
b9ee95fe5e Merge topic 'findice-clang-cl'
541f079bd7 FindIce: Support clang-cl by checking CMAKE_CXX_SIMULATE_ID

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3284
2019-05-06 09:18:28 -04:00
Bartosz Kosiorek
1527defbfe cmMakefile: Enforce explicit use of project() command
Fixes: 17714
2019-05-06 10:58:10 +02:00
Kitware Robot
0f27e7d165 CMake Nightly Date Stamp 2019-05-06 00:01:05 -04:00
Gregor Jasny
f83e4359f2 Apple: Preserve high resolution mtime for static libraries
On macOS ranlib truncates the fractional part of the static achive
file modification time.  If the archive and at least one contained
object file were created within the same second this will make look
the archive older than the object file.  On subsequent ninja runs
this leads to re-achiving and updating dependent targets.

As a work-around we touch the archive after ranlib.

Closes: #19222
2019-05-05 16:14:28 +02:00
Marc Chevrier
34c0293532 FindPython: ensure variable Python_RUNTIME_LIBRARY_DIRS is set correctly 2019-05-05 12:55:39 +02:00
Craig Scott
a6a543ced6 Help: Clarify that link options don't apply to static library targets 2019-05-05 19:05:14 +10:00
Kitware Robot
3771a75d58 CMake Nightly Date Stamp 2019-05-05 00:01:03 -04:00
Jakub Benda
8527dbbf44 FindBLAS: Use Intel fortran interface on OS X even with GNU Fortran
According to Intel MKL Link Line Advisor, there is no GNU Fortran
interface library provided for OS X variant of Intel MKL. Because of
this missing library, FindBLAS was failing on OS X, looking for
nonexistent library libmkl_gf_[i]lp64.

To prevent this, FindBLAS will now always use Intel Fortran interface
for MKL on OS X (libmkl_intel_[i]lp64), even with GNU Fortran.
2019-05-04 10:38:02 +01:00
Kitware Robot
d3a0582b0c CMake Nightly Date Stamp 2019-05-04 00:01:05 -04:00
Cristian Morales Vega
41d262bd3d CTestCoverageCollectGCOV: run gcov with -x
Using "-x" we avoid overwriting .gcov files from source files in
different paths which happen to have the same name. It's similar to
"-p", but it produces shorter file names, reducing the risk of reaching
the file system limit.
2019-05-03 21:28:28 +01:00
Cristian Morales Vega
911b97867b CTestCoverageCollectGCOV: run gcov only once
Running gcov once per .gcda file is not only inefficient, it also
generates wrong data since .gcov files can get overwritten and in
general gcov works with less information.

fakegcov.cmake needs to be able to handle multiple .gcda files for the
test to be meaningful.
2019-05-03 21:25:20 +01:00
Marc Chevrier
e3919bae17 UseSWIG: Manage alternate library name
Manage alternate library name by passing -interface <library_name>
for python language or -dllimport <library_name> for CSharp language
to the SWIG compiler.

Fixes: #18771
2019-05-03 18:20:17 +02:00
Brad King
186ca170da Merge topic 'std-pipes-always'
c85524a94a Ensure stdin, stdout, and stderr pipes are always open

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kyle Edwards <kyle.edwards@kitware.com>
Merge-request: !3282
2019-05-03 11:48:46 -04:00
Brad King
6f242acfcb Merge topic 'cpack-ifw-stylesheet'
c474fb2777 CPack/IFW: Add StyleSheet field

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3270
2019-05-03 11:46:25 -04:00
Brad King
9713154cf6 Merge topic 'jobs-positive-value'
6ad699358b cmake: --build -j <jobs> should not accept 0.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3255
2019-05-03 11:45:32 -04:00
Brad King
cd285b7496 Merge topic 'DetermineCompilerId-versioned-llvm-for-vs'
c846dbf89e CMakeDetermineCompilerId: Support versioned LLVM for Visual Studio.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3281
2019-05-03 11:43:50 -04:00
Brad King
323c4fb989 Merge topic 'genex-TARGET_FILE_BASE_NAME-manage-postfix'
6e5ccabe9b Genex: Update $<TARGET_FILE_BASE_NAME:...>: take care of POSTFIX
1f4c9aa7d2 Refactor: introduce method cmGeneratorTarget::GetFilePostfix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3267
2019-05-03 11:42:47 -04:00
Brad King
784dd90fd4 Merge topic 'memorize_cxx_compilers_with_full_CXX14_support'
3dbec53255 CompileFeatures: Record when compilers gained full CXX14 support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3280
2019-05-03 11:30:04 -04:00
Zack Galbreath
7ddac95121 Help: cross-ref and wording of docs related to ctest_update()
Provide better motivation for users to click through to the CTest manual
from the ctest_update command help page.
2019-05-03 20:26:50 +10:00
jspam
541f079bd7 FindIce: Support clang-cl by checking CMAKE_CXX_SIMULATE_ID
This applies commit d48bf97f, which does the same for FindBoost, to FindIce.
2019-05-03 01:32:14 -04:00
Kitware Robot
713f1a0e7d CMake Nightly Date Stamp 2019-05-03 00:01:06 -04:00
Brad King
c85524a94a Ensure stdin, stdout, and stderr pipes are always open
On non-Windows platforms libuv assumes that file descriptors 0-2 are
always used for standard pipes and never for anything else.  Otherwise,
libuv may re-use one of these descriptors and then fail an assertion
when closing it.  Similarly, On Windows platforms our ConsoleBuf
implementation assumes that the standard handles are always open.

If CMake is run with any standard pipes closed, open them with
`/dev/null` or `NUL` to satisfy these assumptions.

Fixes: #19219
2019-05-02 14:34:58 -04:00
Zaytsev Yuriy
c474fb2777 CPack/IFW: Add StyleSheet field 2019-05-02 13:01:31 -04:00
Zack Galbreath
a0d04d8810 testing: Update terminology in ctest_update tests
Use the word "Update" instead of "Test" in ctest_update's RunCMake tests.

This change was prompted because I noticed that UpdateChangeId-check.cmake
was not actually getting called during the relevant test case.  This file
also had to be updated since its purpose is to detect an expected XML element
(not an attribute).
2019-05-02 10:48:45 -04:00
Robert Maynard
3dbec53255 CompileFeatures: Record when compilers gained full CXX14 support
Use the infrastructure added by commit 646fb1a646 (CompileFeatures:
memoize C++ compilers with full language level support, 2019-03-27) to
avoid using a `try_compile` to check for C++14 feature support when the
running compiler is known to have all features.
2019-05-02 10:23:25 -04:00