Commit Graph

7920 Commits

Author SHA1 Message Date
Thomas Stenersen
11f4c19d7b IPO: Fix support for spaces in path to archive tools
In the normal archiving rules the ``<CMAKE_AR>`` placeholder is replaced
by the generators with a properly-quoted path to the tool.  In the IPO
rules we specify the tools directly, so we need to quote them.

Fixes: #17326
2017-10-06 08:15:55 -04:00
Brad King
4ffa4ddd80 Merge topic 'cuda-default-link-launcher'
7914fb82 CUDA: Fix default selection of host compiler used to drive linking

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1341
2017-10-05 07:36:53 -04:00
Brad King
69257d456a Merge topic 'FindCUDA-run_nvcc-CMP0007'
8b09c20c FindCUDA: Fix CMP0007 warning in run_nvcc.cmake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1340
2017-10-05 07:36:03 -04:00
Brad King
dbb16722ee Merge topic 'find-matlab-r2017b'
f156b2fb FindMatlab: Add support for MATLAB 2017b

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Raffi Enficiaud <raffi.enficiaud@free.fr>
Merge-request: !1343
2017-10-05 07:34:49 -04:00
Christian Pfeiffer
3120615739 FindOpenMP: Fix version if OpenMP doesn't work 2017-10-04 19:53:48 +02:00
Brad King
7914fb8223 CUDA: Fix default selection of host compiler used to drive linking
When no explicit `CMAKE_CUDA_HOST_COMPILER` is specified by the user
then we do not pass `-ccbin` to `nvcc`.  In this case, nvcc's link line
we extract during the compiler identification step may not have the
absolute path to the host compiler it uses to drive linking.  If it is
not absolute, use the `PATH=` from nvcc's output to search for it since
that is the one `nvcc` would use.

This fixes our internal `CMAKE_CUDA_HOST_LINK_LAUNCHER` value used to
construct link lines when using `CUDA` as the linker language.  It needs
to match the host compiler `nvcc` uses internally during compilation.

Fixes: #17323
2017-10-04 10:25:47 -04:00
Jamie Snape
f156b2fbfb FindMatlab: Add support for MATLAB 2017b 2017-10-04 09:47:46 -04:00
Umar Arshad
8b09c20c3a FindCUDA: Fix CMP0007 warning in run_nvcc.cmake
Set `CMP0007` to `NEW` for the entire script.  The script comes with
CMake and is aware of the policy's behavior, so set the policy to ensure
that its warnings do not show up during the build phase.

Fixes: #16579
2017-10-04 08:07:37 -04:00
Brad King
b320eb48f3 Merge topic 'compiler-version-internal'
1bdb8cd2 IAR: Detect compiler platform version
b96ca728 Add infrastructure to detect secondary compiler version information
f952f16d Help: Fix placement of one variable in cmake-variables manual

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1324
2017-10-04 07:07:09 -04:00
Brad King
046625d26f Merge topic 'FindProtobuf-gen-desc'
1299f4cc FindProtobuf: add flag to allow descriptor files to be generated
4e91be95 FindProtobuf: Refactor custom command output listing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1301
2017-10-03 08:14:34 -04:00
Stefan Andersson
1bdb8cd247 IAR: Detect compiler platform version
`__IAR_SYSTEMS_ICC__` provides additional version information that
we need to determine correct usage of the compiler.  Extract and
store it as `CMAKE_<LANG>_COMPILER_VERSION_INTERNAL`.

Issue: #17264
2017-10-03 08:11:27 -04:00
Brad King
b96ca728f1 Add infrastructure to detect secondary compiler version information
Create a `CMAKE_<LANG>_COMPILER_VERSION_INTERNAL` variable to hold
a secondary/internal compiler version number detected at the same
time as the primary compiler version.  This will be useful for some
compilers where we need such a number to determine correct usage.

Inspired-by: Stefan Andersson <tfosm@hotmail.com>
Suggested-by: Norbert Lange <norbert.lange@andritz.com>
Issue: #17264
2017-10-03 08:11:27 -04:00
Peter Mitrano
1299f4cc5e FindProtobuf: add flag to allow descriptor files to be generated
- The .desc files will be in the same folder as the generated .cc and .h files.
- Paths to generate .desc files are stored in a variable passed in
- This is only implemented for C++
- Remove legacy ARGS
- Add test that generates and uses C++ protobuf message
- Add test that checks that the generated .desc file can be instantiated
  with DynamicMessageFactory
- Add Help rst for new feature
2017-10-02 08:08:24 -04:00
Brad King
4e91be9532 FindProtobuf: Refactor custom command output listing
Reduce duplication by storing the custom command outputs in variables.
Also, since custom command outputs are automatically marked as generated
we do not need to do so explicitly.
2017-10-02 08:04:24 -04:00
Brad King
275b4a53ee Merge topic 'autogen-predefs'
6bbc1e77 Autogen: Add release notes for (CMAKE_)AUTOMOC_COMPILER_PREDEFINES
75c98b5e Autogen: Doc: Add documentation for (CMAKE_)AUTOMOC_COMPILER_PREDEFINES
1d7f099d Autogen: Add (CMAKE_)AUTOMOC_COMPILER_PREDEFINES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1328
2017-10-02 08:01:21 -04:00
Brad King
c044b9ae84 FindBoost: Improve messages when a Boost CMake package is found
Add a test for this case to verify the messages.  This test will also be
valuable to cover this code path in which we've had several regressions
recently.
2017-09-29 10:10:01 -04:00
Brad King
6bced4bf76 Merge topic 'cuda_9_support'
fe37b994 CUDA: Add support for requesting C++98 under CUDA 9

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1315
2017-09-29 09:23:39 -04:00
Sebastian Holtermann
1d7f099d9c Autogen: Add (CMAKE_)AUTOMOC_COMPILER_PREDEFINES 2017-09-29 15:00:47 +02:00
Brad King
9fc0453140 Merge topic 'external-project-refactor-ep_get_complete_stampfile'
da470525 ExternalProject: Refactor code introducing _ep_get_complete_stampfile

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1323
2017-09-29 08:55:17 -04:00
Brad King
41492c2d99 Merge topic 'FindMatlab-version-quoting'
a245f850 FindMatlab: Fix extraction of quoted version number

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1316
2017-09-29 08:54:22 -04:00
Jean-Christophe Fillion-Robin
da4705255e ExternalProject: Refactor code introducing _ep_get_complete_stampfile 2017-09-27 22:42:08 -04:00
Sebastian Holtermann
786b5be03b Autogen: Define all macro names in CMAKE_AUTOMOC_MACRO_NAMES
Instead of adding `Q_OBJECT` and `Q_GADGET` to the macro search list
in `Source/cmQtAutoGenerators.cxx`, add them in
`Modules/CMakeGenericSystem.cmake` to the default value of
`CMAKE_AUTOMOC_MACRO_NAMES`.
Also add `Q_NAMESPACE` to `CMAKE_AUTOMOC_MACRO_NAMES`
which closes #17299.
2017-09-27 14:13:12 +02:00
Brad King
f9c619105c Merge topic 'GetPrerequisites-no-clear-on-missing'
1a7b8c83 GetPrerequisites: Restore behavior on missing binary of not clearing list

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1312
2017-09-27 07:16:06 -04:00
Brad King
05e234cb16 Merge topic 'autogen-per-config-sources'
4603d6b0 Autogen: Docs: Add documentation internal links
f86ba8ee Autogen: Reintroduce per-config sources support
5d3bca64 Autogen: Rename cmQtAutoGen::GeneratorType to cmQtAutogen::Generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1307
2017-09-27 07:15:12 -04:00
Brad King
a245f850bc FindMatlab: Fix extraction of quoted version number
The version string in recent Matlab versions has changed.
Now the version number is inside two `'`.

Patch-by: nama on gitlab.kitware.com
Fixes: #17308
2017-09-27 06:56:10 -04:00
Robert Maynard
fe37b99473 CUDA: Add support for requesting C++98 under CUDA 9
Starting in CUDA 9 the default compilation mode is C++14, and you need
to explicitly enable C++98/03 mode.

While at it, document `14` among the values for `CUDA_STANDARD`.  This
was accidentally left out of commit v3.9.0-rc1~118^2 (CUDA: Add support
for the C++14 standard flag, 2017-05-11).
2017-09-26 11:08:09 -04:00
Brad King
1a7b8c8321 GetPrerequisites: Restore behavior on missing binary of not clearing list
Prior to commit v3.4.0-rc1~264^2~1 (GetPrerequisites: Add error checks
for execute_process() calls, 2015-07-29), `get_prerequisites` would
simply warn on a missing binary and not update the result list at all.
That commit accidentally made the case an error.  This was fixed by
commit v3.8.0-rc1~110^2 (GetPrerequisites: Do not fail on files we
cannot find, 2017-01-10), but the fix also cleared the result list.
Clearing the list is incorrect because it is supposed to be able to
accumulate results over multiple calls.

Remove the list clearing behavior to restore the original behavior on a
missing binary.

Fixes: #17306
2017-09-26 07:31:33 -04:00
Sebastian Holtermann
f86ba8ee8e Autogen: Reintroduce per-config sources support
Reintroduce per-config sources support in AUTOGEN but disable it by default.
2017-09-25 16:27:38 +02:00
Tom Fogal
e2e8a690cd FindOpenGL: Add support for GLVND on Linux
Find GLVND components if available.  Add `GLX` and `EGL` options for
COMPONENTS that allow requesting these libraries explicitly.  Introduce
new import targets for these windowing-system-specific libraries.

On a GLVND system, populate the legacy `OPENGL_LIBRARIES` variable and
the `OpenGL::GL` target using the `OpenGL` and `GLX` components.  On
non-GLVND systems, continue to use the legacy `GL` library and simply do
not provide the GLVND components.  Application code can choose to adapt
based on the availability of GLVND components as imported targets.
2017-09-25 09:22:29 -04:00
Brad King
10fb805987 Merge topic 'FindOpenACC'
d3b6f291 FindOpenACC: Add module to detect compiler support for OpenACC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1209
2017-09-25 09:00:59 -04:00
Brad King
62bdc587eb Merge topic 'cpackifw-options'
9a24ab6b CPackIFW: Add some options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1298
2017-09-25 08:58:25 -04:00
Brad King
bb535bedc0 Merge topic 'FindOpenMP-CMP0054'
dd5324ab FindOpenMP: Avoid CMP0054 warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1303
2017-09-25 08:56:00 -04:00
Craig Scott
c3877b892a Merge topic '16839-better-tvos-support'
45e30d12 Xcode: Add team to compiler-id project
0be0e02c Xcode: Add tvOS and watchOS toolchain file support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1278
2017-09-24 08:02:57 -04:00
Craig Scott
de5dd4f4fa Merge topic 'graphviz-link-type'
5b46cc91 graphviz: distinguish target dependency types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1229
2017-09-22 18:28:59 -04:00
Brad King
dd5324ab1e FindOpenMP: Avoid CMP0054 warnings
When invoked in projects that don't set CMP0054 to NEW, FindOpenMP
triggers a warning:

    CMake Warning (dev) at .../Modules/FindOpenMP.cmake:... (if):
      Policy CMP0054 is not set...Quoted variables like "c" will no
      longer be dereferenced when the policy is set to NEW.  Since
      the policy is not set the OLD behavior will be used.

Set the policy within the module's scope to avoid this.

Fixes: #17292
2017-09-22 13:50:35 -04:00
Tin Huynh
d3b6f29140 FindOpenACC: Add module to detect compiler support for OpenACC 2017-09-22 10:42:27 -04:00
Brad King
33eec57232 Merge topic 'cpack-rpm-deb-version'
74b7457f CPack RPM and DEB: improved package version handling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1296
2017-09-22 10:14:49 -04:00
Domen Vrankar
545d9a17e5 CPack/RPM: new CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST exclude paths
Patch adds `/usr/share/aclocal` path to exclude list and
and documents `/usr/libx32` and `/usr/include` paths that
were already on the list.

Closes: #17056
2017-09-21 20:59:13 +02:00
Nico Müller
5b46cc91d9 graphviz: distinguish target dependency types
- The output graph of graphviz differs now between target link types
- Updated documentation
- Fixes: #17192
2017-09-21 20:49:44 +02:00
Konstantin Podsvirov
9a24ab6b63 CPackIFW: Add some options
The `CPackIFW` module `cpack_ifw_configure_component` and
`cpack_ifw_configure_component_group` commands gained a new
`REPLACES` and `CHECKABLE` options.
2017-09-21 21:34:33 +03:00
Domen Vrankar
74b7457f12 CPack RPM and DEB: improved package version handling
Adds support for epoch version to CPackRPM and
CPackDeb packagers.
Also adds better version checking to CPackDeb
that complies with Debian rules.

Fixes: #17057
2017-09-21 19:54:17 +02:00
Brad King
aa8ad21ea5 Merge topic 'midipix-support'
0df43496 Midipix: Add minimal platform file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1294
2017-09-21 08:26:32 -04:00
Brad King
6f666f4335 Merge topic 'freebsd-compiler-name'
3cf3bb71 Help: Add notes for topic 'freebsd-compiler-name'
a0508dee FreeBSD prefers to call the C++ compiler c++ (just like Linux, Darwin, ..)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1293
2017-09-21 08:25:23 -04:00
midipix
0df434967c Midipix: Add minimal platform file
Add Midipix.cmake (UnixPaths, no overrides, no special cases).
2017-09-20 14:44:30 -04:00
Brad King
7f8999dfc6 Merge topic 'pgi-fortran-flag-fix'
485a6f0e PGI-Fortran: Add -Mipa=fast,inline as IPO option.
97f0b177 PGI-Fortran: Remove -Kieee and -Mpreprocess

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1239
2017-09-20 13:21:21 -04:00
Adriaan de Groot
a0508dee93 FreeBSD prefers to call the C++ compiler c++ (just like Linux, Darwin, ..) 2017-09-20 10:52:29 +02:00
Gregor Jasny
45e30d128c Xcode: Add team to compiler-id project
Closes #16839
2017-09-19 20:44:31 +02:00
Gregor Jasny
0be0e02cfb Xcode: Add tvOS and watchOS toolchain file support
Issue #16839
2017-09-19 20:44:31 +02:00
Brad King
f23def2cf3 Improve formatting of compiler failure error message
When we report that a compiler was unable to build a simple test
program, indent the output of the attempt so that our message formatting
will show it as a pre-formatted block.
2017-09-19 09:14:40 -04:00
Brad King
71c752a63b Merge topic 'gtest-fix-windows-linking'
e2cca9f8 FindGTest: Avoid macro name collision
4636c64b FindGTest: Improve test to catch link error
35061791 FindGTest: Fix shared linking on Windows
9fd9e448 FindGTest: Avoid using find_dependency in a find module

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1267
2017-09-19 08:24:25 -04:00