Commit Graph

38876 Commits

Author SHA1 Message Date
Sander Vrijders
3af0438b4b TestDriver: Replace strncpy with strcpy
GCC 8.1.0 now gives an error if `strncpy` is called with a bound
depending on the length of the source argument.  Replace `strncpy` with
`strcpy` as the length is known a priori.

Fixes: #18038
2018-05-30 09:45:57 -04:00
Brad King
519427e32c CMake 3.11.2 2018-05-17 09:07:43 -04:00
Brad King
29d20e2e0c Merge branch 'fix-automoc-warnings' into release-3.11
Merge-request: !2066
2018-05-15 09:52:09 -04:00
Matthew Woehlke
9672d81ca3 Qt4Macros: Don't AUTOMOC or AUTOUIC qt4-generated files
Suppress AUTOMOC and AUTOUIC on files generated by Qt4 wrapping macros;
particularly, those generated by `qt4_wrap_cpp`, `qt4_wrap_ui`, and
`qt4_add_resources`.  None of these should need AUTOMOC or AUTOUIC
treatment, and CMP0071 makes it important to mark this explicitly.
2018-05-15 09:50:22 -04:00
Matthew Woehlke
800b2fcf80 Qt4Macros: Use get_property/set_property
Replace use of old-style {get,set}_source_file_properties with newer
{get,set}_property.
2018-05-15 09:48:11 -04:00
Brad King
813bcc2997 Merge branch 'custom-command-expand-empty' into release-3.11
Merge-request: !2074
2018-05-14 11:59:51 -04:00
Brad King
6e59491659 add_custom_{command,target}: Fix crash on empty expanded command
Our custom command generation logic assumes that all command lines have
at least `argv0`.  In `add_custom_{command,target}` we already check
that at least a `COMMAND` was given, but using `COMMAND_EXPAND_LISTS` in
combination with a generator expression that expands to an empty string
may produce an empty command line.  In this case simply add an empty
string as a command to maintain our internal invariant.

Fixes: #17993
2018-05-14 11:54:27 -04:00
Brad King
7b62ec2451 Merge branch 'autogen_register_info_files' into release-3.11
Merge-request: !2071
2018-05-14 09:40:13 -04:00
Sebastian Holtermann
e461a136c1 Autogen: Register generated dependency files
For CMP0058 record that rcc info files are generated by CMake.

Fixes: #17985
2018-05-14 09:21:14 -04:00
Brad King
72e9fcdf2f Merge branch 'irsl-fortran-only-linux' into release-3.11
Merge-request: !2061
2018-05-11 09:45:59 -04:00
Christian Pfeiffer
05ece372a6 IRSL: Fix Intel library list for ifort-only setups
Fixes: #17727
2018-05-11 09:45:07 -04:00
Brad King
4f0c5d3775 Merge branch 'restore-imported-lib-alias-diagnostic' into release-3.11
Merge-request: !2058
2018-05-10 10:11:48 -04:00
Brad King
e567d7eb63 add_library: Restore error on alias of non-global imported target
In commit v3.11.0-rc1~433^2~1 (Add support for IMPORTED GLOBAL targets
to be aliased, 2017-09-14) we accidentally dropped the error on calling
`add_library` to alias an imported target that is not globally visible.
The `add_executable` command's equivalent check was properly updated.
Restore the check in `add_library` with the same update.  Also fix the
test case accordingly.

Fixes: #17982
2018-05-10 09:57:31 -04:00
Brad King
b28e093f6a Merge branch 'FindBoost-backport-python-deps' into release-3.11
Merge-request: !2045
2018-05-09 08:02:57 -04:00
Filip Matzner
81cc993f89 FindBoost: Backport versioned python dependencies for v1.35 to v1.66
Update `mpi_python##` and `numpy##` component dependencies to honor
python version suffixes on components named by the caller.  Although
upstream Boost did not add version suffixes prior to version 1.67, it is
commonly done by distros.  Honor suffixes specified by project code.
Projects must take responsibility for naming distro-specific component
suffixes for versions prior to 1.67.

Fixes: #17892, #17970
2018-05-09 07:57:36 -04:00
Brad King
557e68e1a3 FindBoost: Remove extra indentation in 1.65/1.66 dependency block 2018-05-08 08:51:57 -04:00
Brad King
0df2e30638 Merge branch 'FindCUDA-revert-sepcomp-cublas' into release-3.11
Merge-request: !2048
2018-05-08 08:38:46 -04:00
Brad King
c400cd4f3a Merge branch 'doc-updates' into release-3.11
Merge-request: !2043
2018-05-08 08:38:34 -04:00
Brad King
6a95a097d9 Merge branch 'java-new-packaging-fixes' into release-3.11
Merge-request: !2042
2018-05-08 08:38:25 -04:00
Brad King
9a66345752 FindCUDA: Fix regression in separable compilation without cublas
Revert commit v3.11.0-rc1~274^2 (FindCUDA: Add cublas device library to
separable compilation, 2017-11-03).  It breaks targets that do not link
to cublas.  Another solution will be needed to solve the original
problem in a more compatible way.

Fixes: #17965
2018-05-07 11:30:21 -04:00
Marc Chevrier
e15adbfed3 Help: Specify COMPILE_OPTIONS and COMPILE_FLAGS source properties usage 2018-05-07 09:45:23 -04:00
Marc Chevrier
b4e1569315 FindJava, FindJNI: fix erroneous regex, enhance registry lookup 2018-05-07 09:40:55 -04:00
Brad King
5089d950c3 Merge branch 'ctest-libuv-linux-sparc64' into release-3.11
Merge-request: !2029
2018-05-02 11:21:04 -04:00
Brad King
1c22fdf360 libuv: linux/sparc64: use fcntl to set and clear O_NONBLOCK
Upstream libuv commits:

* node-v0.6.0~28 (linux: use ioctl(FIONBIO) to set O_NONBLOCK, saves a syscall, 2011-10-29)
* v1.11.0~11 (unix: use async-signal safe functions between fork and exec, 2016-12-12)

left an asymmetry in the way O_NONBLOCK is set and cleared.  Normally
ioctl/FIONBIO is used for both.  However, uv_spawn uses fcntl/O_NONBLOCK
to clear O_NONBLOCK between fork and exec.  This fails on Linux/sparc64
where setting via ioctl/FIONBIO actually sets two bits (in O_NDELAY)
that cause clearing via fcntl/O_NONBLOCK to be silently ignored (though
clearing via ioctl/FIONBIO or fcntl/O_NDELAY works).

Since CMake commit v3.11.0-rc1~117^2 (CTest: Re-implement test process
handling using libuv, 2017-12-10), CTest uses libuv.  On Linux/sparc64
child processes have been started with non-blocking output pipes.  This
can lead to write errors or lost output from children not prepared to
deal with `EAGAIN` on stdout or stderr.

Fix this for now by switching libuv back to fcntl/O_NONBLOCK to set and
clear O_NONBLOCK when compiled on Linux/sparc64.

LibUV-Issue: 1830
Fixes: #17941
2018-05-02 11:16:19 -04:00
Brad King
321442580e Merge branch 'cxx-checks-tolerate-more-warnings' into release-3.11
Merge-request: !2019
2018-04-30 09:18:58 -04:00
Brad King
2254b72061 C++ feature checks: Filter out warnings caused by local configuration
In some environments the linker produces warnings like

    warning: directory not found for option
    warning: object file compiled with -mlong-branch ...

These do not affect the availability of C++ features we're checking,
so filter them out.

Fixes: #17850, #17947
2018-04-30 09:18:15 -04:00
Brad King
1f06c0d8a8 Merge branch 'java-new-packaging-version-sort' into release-3.11
Merge-request: !2016
2018-04-27 08:53:02 -04:00
Marc Chevrier
1013560a6a FindJava, FindJNI: Ensure most recent version is searched first 2018-04-27 08:52:22 -04:00
Brad King
a92ee4e30d Merge branch 'backport-ninja-issue-17942' into release-3.11
Merge-request: !2010
2018-04-26 08:41:18 -04:00
Brad King
0826c20128 Ninja: Do not add empty custom command for file(GENERATE) outputs
Internally we mark `file(GENERATE)` outputs as `GENERATED` in order
to tell custom command dependency tracing logic not to expect the
files to exist on disk yet.  This is because we do not generate the
files until after that tracing is done.

The Ninja generator also interprets the `GENERATED` property to mean
that it is expected that some build rule will generate the file if
another build rule depends on it.  If the generator does not know of a
custom command that generates the file then it adds an empty one so that
the `ninja` build tool does not complain about a dependency on a file
that does not exist and has no rule to generate it.  However, this step
is not necessary for `file(GENERATE)` outputs because there is no build
rule to generate them and they will exist before `ninja` runs.

Add an additional `__CMAKE_GENERATED_BY_CMAKE` property internally to
tell the Ninja generator that a `GENERATED` file will exist before the
build starts and is not expected to have a build rule producing it.

Fixes: #17942
2018-04-26 08:39:44 -04:00
Brad King
b58e41ccbd Merge branch 'backport-java-new-packaging' into release-3.11
Merge-request: !2007
2018-04-25 09:42:58 -04:00
Marc Chevrier
5482f485b8 FindJava, FindJNI, UseJava: update for version 10 support
* new version format
* new registry layout on Windows

Fixes: #17938
2018-04-25 09:18:53 -04:00
Brad King
dc3401d5b0 Merge branch 'BLAS-no-target-in-libs' into release-3.11
Merge-request: !2006
2018-04-24 13:58:11 -04:00
Rolf Eike Beer
7d756f37cc FindBLAS: do not write an imported target name into BLAS_LIBRARIES
Since commit v3.11.0-rc1~177^2 (FindBLAS: optionally query pkg-config
for a library, 2017-12-15) the `BLAS_LIBRARIES` result variable may
incorrectly contain the name of an imported target.  Instead store the
list of libraries in the variable.  Unfortunately pkg_check_modules does
not provide a way to get this so we need to use a (temporary) hack of
reading `INTERFACE_LINK_LIBRARIES` from the interface library target.

Fixes: #17934
2018-04-24 13:49:20 -04:00
Rolf Eike Beer
946846aaf5 FindPkgConfig: do not unset unused variable
_props is never used, it was a leftover from a development step.
2018-04-24 13:46:41 -04:00
Brad King
0b992b9751 Merge branch 'fix-CMAKE_DISABLE_SOURCE_CHANGES-top-dir' into release-3.11
Merge-request: !2001
2018-04-24 10:44:49 -04:00
Marc Chevrier
60cb75e4a1 Fix CMAKE_DISABLE_SOURCE_CHANGES recognition of top of build tree
The change in commit v3.11.0-rc1~480^2 (UseJava: add_jar OUTPUT_DIR
option used only for jar generation, 2017-10-12) added code of the form
`file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR})`.  This exposed an existing
bug in `CMAKE_DISABLE_SOURCE_CHANGES` in which it does not recognize
that the top of the build tree itself is in the build tree.  Fix that
now.

Fixes: #17933
2018-04-24 10:42:00 -04:00
Brad King
c86386caa3 Merge branch 'InstallRequiredSystemLibraries-mfcm' into release-3.11
Merge-request: !1980
2018-04-18 09:19:36 -04:00
Christof Krüger
bdf660cab5 InstallRequiredSystemLibraries: Check for existence of mfcm dlls
Previously, only existence of `mfc${v}.dll` and `mfc${v}d.dll` variants
was checked and it was assumed that the managed variants `mfcm*.dll`
also existed.  This assumption doesn't hold with Visual Studio 2017.
Check each file separately.

Fixes: #17913
2018-04-18 09:18:57 -04:00
Brad King
fbe6cd1596 CMake 3.11.1 2018-04-17 08:33:46 -04:00
Brad King
d1d43a6dbf Merge branch 'bootstrap_system_libuv_option' into release-3.11
Merge-request: !1971
2018-04-17 07:52:19 -04:00
Kirill Erofeev
bbf64794ac bootstrap: Add option to enable/disable usage of system libuv 2018-04-17 07:44:01 -04:00
Brad King
054c849112 Merge branch 'FindOpenMP-Intel-Windows' into release-3.11
Merge-request: !1957
2018-04-16 14:12:46 -04:00
Roland Schulz
0c7433e874 FindOpenMP: Fix support for Intel on Windows
The change in commit v3.11.0-rc1~334^2 (FindOpenMP: Use NO_DEFAULT_PATH
where appropriate, 2017-11-15) broke partial support for Intel on Windows.
Since `OpenMP_${LANG}_IMPLICIT_LINK_DIRS` is empty for this compiler
the `find_library` call without `NO_DEFAULT_PATH` worked accidentally
in environments with the needed libraries in the search path already.

Fix support for Intel on Windows by simply removing our explicit search
for the `libiomp5md` library.  In cases that it is needed, the compiler
already inserts metadata in `.obj` files to tell the MSVC linker to use
the library.

Suggested-by: Christian Pfeiffer <cpfeiffer@live.de>
Fixes: #17910
2018-04-16 14:11:12 -04:00
Brad King
90cdd06f4c Merge branch 'implicit-lib-gcceh-file' into release-3.11
Merge-request: !1967
2018-04-16 11:58:30 -04:00
Brad King
eb0498357f Exclude "libgcc_eh" library files from implicit link libraries
Extend the fix in commit v3.9.6~1^2 (Restore exclusion of "gcc_eh" from
implicit link libraries, 2017-11-07) to also exclude `gcc_eh` libraries
referenced by absolute path to the library file.

Issue: #17436
2018-04-16 11:56:23 -04:00
Brad King
cb8c758fdb Merge branch 'libuv_version_bump' into release-3.11
Merge-request: !1966
2018-04-16 11:38:17 -04:00
ErofeevK
f5f72ff844 Explicitly require LibUV 1.10 or higher to build CMake
CMake 3.11 now uses `uv_translate_sys_error` introduced in LibUV 1.10.
2018-04-16 11:33:52 -04:00
Brad King
d00306636b Merge branch 'backport-fix-explicit-CMakeLists.txt' into release-3.11
Merge-request: !1959
2018-04-13 09:49:51 -04:00
Brad King
8480c2afc0 Restore support for explicitly referenced CMakeLists.txt sources
Since commit v3.11.0-rc1~467^2 (VS,Xcode: Add CMakeLists.txt sources
without mutating targets, 2017-10-18) we do not add `CMakeLists.txt` to
target sources but instead generate references to them directly.  This
broke projects that explicitly specify their `CMakeLists.txt` file as a
source file because the explicit entry is no longer consolidated with
the generated one.

Teach the relevant generators to avoid duplicating `CMakeLists.txt`
source references and add test cases.

Fixes: #17828
2018-04-13 09:41:06 -04:00