Commit Graph

8457 Commits

Author SHA1 Message Date
Brad King
156a959410 Merge topic 'FindGDAL-absolute-path'
694fce19b6 FindGDAL: Handle gdal-config printing absolute path to library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1808
2018-03-08 09:58:56 -05:00
Brad King
50b2d0c944 Merge topic 'misc-typos'
32f6b7a43b Fix misc typos in documentation and comments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1826
2018-03-08 09:58:19 -05:00
Brad King
151763c9b2 Merge topic 'curl-target'
ee06f3c339 FindCURL: Revise documentation markup
83c0cb3f03 FindCURL: provide imported target CURL::CURL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1822
2018-03-08 09:56:40 -05:00
Brad King
69b152967d Merge topic 'cuda-no-device-link-rsp'
f64732f59b CUDA: Do not pass unsupported @rspfile arguments to NVCC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1831
2018-03-08 09:48:28 -05:00
luz.paz
32f6b7a43b Fix misc typos in documentation and comments 2018-03-07 10:54:46 -05:00
Brad King
57f35bba84 Merge branch 'cuda-no-device-link-rsp' into release-3.11
Merge-request: !1831
2018-03-07 10:52:54 -05:00
Brad King
f64732f59b CUDA: Do not pass unsupported @rspfile arguments to NVCC
The nvcc compiler does not support `@<rspfile>` arguments.  It does
offer a `--options-file` argument that can be investigated later.

Fixes: #17797
2018-03-07 10:30:35 -05:00
Adam Thompson
694fce19b6 FindGDAL: Handle gdal-config printing absolute path to library
FindGDAL uses GDAL's 'gdal-config' utility to obtain the path to GDAL's library
(on systems identified by CMake's UNIX variable). Older versions formatted this
information like that of dependent libraries:
  -L/path/to/gdal/lib -lgdal[suffix]

Newer versions instead provide the full path to the library:
  /path/to/gdal/lib/[prefix]gdal[suffix]

FindGDAL now supports both formats. Entries that don't start with '-L' or '-l'
are only considered if they are absolute paths that exist on disk.
Furthermore, libraries are only considered if the name contains 'gdal'
(checked case-insensitively).
2018-03-07 09:29:57 -05:00
Brad King
ee06f3c339 FindCURL: Revise documentation markup 2018-03-07 09:06:01 -05:00
Brad King
9ceafdfd4d Merge topic 'FindOpenMP-AppleClang'
e3cd7c1e01 FindOpenMP: Add support for AppleClang compiler
b4c539e651 FindOpenMP: Verify in test source that OMP library is linked
7dd8c7a680 FindOpenMP: Improve inclusion of helper modules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1812
2018-03-07 08:33:33 -05:00
Henry Fredrick Schreiner
e3cd7c1e01 FindOpenMP: Add support for AppleClang compiler
This is possible using an external `omp` library and by passing
the flag past the compiler driver via `-Xclang -fopenmp`.

Fixes: #17775
2018-03-07 08:27:35 -05:00
Henry Fredrick Schreiner
b4c539e651 FindOpenMP: Verify in test source that OMP library is linked 2018-03-07 08:25:45 -05:00
Henry Fredrick Schreiner
7dd8c7a680 FindOpenMP: Improve inclusion of helper modules
Use `CMAKE_CURRENT_LIST_DIR` instead of `CMAKE_ROOT`.
Do not include modules inside a loop.
2018-03-07 08:24:27 -05:00
Brad King
4f29bf5672 Merge topic 'xl-new-compiler-macros'
eb1a9be4b6 XL: Recognize compilers identified by __ibmxl__

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Chuck Atkins <chuck.atkins@kitware.com>
Merge-request: !1820
2018-03-07 07:12:02 -05:00
Rolf Eike Beer
83c0cb3f03 FindCURL: provide imported target CURL::CURL 2018-03-06 22:53:35 +01:00
Brad King
eb1a9be4b6 XL: Recognize compilers identified by __ibmxl__
IBM XL C/C++ for Linux versions 13.1.6 and above no longer define
`__IBMC__` or `__IBMCPP__` by default (see `-qxlcompatmacros`).
Instead `__ibmxl__` now identifies the compiler along with some
related new version macros.

Fixes: #17784
2018-03-06 07:43:04 -05:00
Brad King
74dac86c76 Merge topic 'findjava-jar-in-dev-component'
596a7f262a FindJava: Add Java_JAR_EXECUTABLE to a component: Development

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1807
2018-02-28 08:16:52 -05:00
Giel van Schijndel
596a7f262a FindJava: Add Java_JAR_EXECUTABLE to a component: Development
All discovered executables were placed in a component, except for 'jar'.
This forced the use of find_package(Java) without any component
specification.  This commit adds 'jar' to the 'Development' component,
because that's what it's used for.
2018-02-27 17:32:09 +01:00
Brad King
2bcccd07bd Merge topic 'modules-restore-path-suffixes'
7b1c1424 Modules: Restore recently removed search path suffixes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1802
2018-02-27 09:26:31 -05:00
Brad King
e708dac65f Merge branch 'modules-restore-path-suffixes' into release-3.11
Merge-request: !1802
2018-02-26 10:53:16 -05:00
Brad King
7b1c14241d Modules: Restore recently removed search path suffixes
Refactoring in commit v3.11.0-rc1~293^2~4 (Modules: Remove paths set as
global Unix prefixes, 2017-11-20) removed `PATH_SUFFIXES` options that
appeared to be used to cover subdirectories of the `PATHS` options that
were also removed.  However, the path suffixes also apply to other
search paths and so should not be removed.  Restore them.

Fixes: #17760
2018-02-26 10:52:11 -05:00
Brad King
e4df2313c1 Merge topic 'ipo-support'
a18147e9 MSVC,Clang,Flang: Add IPO support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1721
2018-02-26 08:59:32 -05:00
xoviat
a18147e933 MSVC,Clang,Flang: Add IPO support
Fixes: #17692
2018-02-23 10:27:57 -05:00
Brad King
020be379f4 Merge topic 'fortran-compiler'
965f977c Fortran: Adjust compiler candidates based on host platform

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1780
2018-02-22 11:37:10 -05:00
Brad King
fef001884f Merge topic 'FindLua-tolerate-var'
6cced787 FindLua: Fix error when LUA_INCLUDE_PREFIX is set as a variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1778
2018-02-21 10:44:08 -05:00
Brad King
fcae625f48 Merge topic 'FindwxWidget/fix-eating-minusL-in-path'
67db3ff9 Fix eating "-L" in path names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1775
2018-02-21 10:43:40 -05:00
Brad King
283562624c Merge topic 'find-linker'
e936b6bb CMakeFindBinUtils: Find linker in PATH

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1720
2018-02-21 10:43:09 -05:00
xoviat
e936b6bb5a CMakeFindBinUtils: Find linker in PATH
Fixes: #17693
2018-02-21 10:42:15 -05:00
xoviat
965f977c7c Fortran: Adjust compiler candidates based on host platform
Typical Fortran compiler command-line tool names differ on Windows and
non-Windows platforms.  Also, the name `ifc` should not be used on
Windows because there is an `ifc.exe` tool in Visual Studio that is
unrelated.

Fixes: #17752
2018-02-21 10:23:38 -05:00
Frank Benkstein
6cced78725 FindLua: Fix error when LUA_INCLUDE_PREFIX is set as a variable
We use `LUA_INCLUDE_PREFIX` for the result of an internal `find_path`
call and unset the cache entry before each use.  Unset a plain variable
of this name too in case it was set by project code.  Otherwise the
`find_path` call may be skipped and the wrong value used, leading to
errors.
2018-02-20 16:13:45 -05:00
Brad King
a8d182fbbf Merge topic 'ti-depfile-flag-fix'
cab9af7e Compiler/TI: Fix depfile generation for C++

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1774
2018-02-20 11:54:15 -05:00
Brad King
82c23d6afc Merge branch 'ti-depfile-flag-fix' into release-3.11
Merge-request: !1774
2018-02-20 11:52:30 -05:00
Grzegorz Dobinski
cab9af7e97 Compiler/TI: Fix depfile generation for C++
In commit v3.11.0-rc1~466^2 (Compiler/TI: Add support for depfile
generation for Ninja, 2017-10-16) the flag for C++ was added in a
variable with a typo in its name.  Fix the spelling.

Issue: #17360
2018-02-20 11:52:11 -05:00
Brad King
3bc3762c7c Merge topic 'findzlib-folder-priority'
c01eede8 FindZLIB: Search names per directory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1769
2018-02-20 11:42:23 -05:00
Brad King
1fbd5f4a7e Merge topic 'CheckCSourceRuns-log-run-output'
b25b39ad CheckCSourceRuns: Teach CHECK_C_SOURCE_RUNS to log run output

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1772
2018-02-20 11:41:50 -05:00
Brad King
088c1876ef Merge topic 'follow-up-misc-typos'
287e7a17 Maint: misc. typos

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1771
2018-02-20 11:41:15 -05:00
Raffi Enficiaud
67db3ff958 Fix eating "-L" in path names
When the path containing the wxLibraries contains a "-L", a "string(REPLACE "-L" ...)
replaces the content and results in a wrong path. The regex fixes this.
2018-02-17 16:15:57 +01:00
Edward Z. Yang
b25b39ad76 CheckCSourceRuns: Teach CHECK_C_SOURCE_RUNS to log run output
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Fixes: #17745
2018-02-16 09:51:26 -05:00
luz.paz
287e7a175c Maint: misc. typos
Found via `codespell`
2018-02-16 09:47:17 -05:00
Stefan Hacker
c01eede894 FindZLIB: Search names per directory
FindZLIB accepts various names for zlib (e.g. "z", "zlib", ...) in
various search locations. Before this patch zlib ignored the priority
implied by the search locations and instead prioritized based on the
library name. Consequently ensuring the pick of a zlib from e.g. a
CMAKE_PREFIX_PATH was not possible if it didn't have the highest
priority name ("z").

This unexpected behavior led to bugs in third party projects (e.g.
https://github.com/Microsoft/vcpkg/issues/1939). A common way to
encounter the issue in the wild is on Windows with the popular
Anaconda python distribution which puts a "z.lib" in a lib/
subdirectory reachable from a bin/ path in PATH. From then on cmake
will always pick up this library instead of the one intended by the
user.

This patch adds the NAMES_PER_DIR option to the find_library calls made
by FindZLIB making it search each directory for all names before
considering lower priority directory names resolving these issues.
2018-02-15 21:38:48 +01:00
Shane Parris
e78e24f68c Replaces execute_process calls to touch files with file(TOUCH) calls 2018-02-15 10:54:38 -05:00
Marc Chevrier
0bef9eb410 UseSWIG: modernize module 2018-02-14 08:35:04 +01:00
Marc Chevrier
d6048bd153 UseSWIG: Re-work test framework 2018-02-14 08:35:04 +01:00
Brad King
58c637643d Merge topic 'more-misc-typos'
193082a3 MAINT: Misc. typos

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1758
2018-02-13 11:28:31 -05:00
luz.paz
193082a3c8 MAINT: Misc. typos
Found via `codespell -q 3 -I ../cmake-whitelist.txt`.
2018-02-13 11:24:30 -05:00
Roman Wüger
9178523968 FindImageMagick: Add 7.0 library names
For ImageMagick 7.0.x we need to consider `CORE_RL_MagickWand_` and
`CORE_RL_MagickCore_`.
2018-02-06 14:54:33 -05:00
Brad King
213ecf05d6 Merge topic 'autogen-improve-multi-config'
a8ee7406 Autogen: Improved multi-config include scheme

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1735
2018-02-05 08:43:05 -05:00
Marc Chevrier
bc3697fa51 UseSWIG: Restore support for like-named .i files in different modules
Fix logic added by commit 2ee10119ea (swig: fix incremental build in
case of removed interface files, 2017-11-06).  Name the extra targets
added for Makefile generators using both the module name and .i base
name to avoid collisions across modules.  Also make sure the extra
targets added for all .i files in a module are added as dependencies
instead of just the last one.

Fixes: #17704
2018-02-02 07:41:44 -05:00
Sebastian Holtermann
a8ee7406a7 Autogen: Improved multi-config include scheme
For multi configuration generators AUTOMOC generates the
moc files that are included in `mocs_compilation.cpp`
in `AUTOGEN_BUILD_DIR/include_$<CONFIG>/`. By doing so each
configuration reads different moc files when compiling
`mocs_compilation.cpp`. Since we do not (need to) rewrite
`mocs_compilation.cpp` on a configuration change anymore,
the files also does not need to be recompiled anymore.
Not having to rewrite and recompile `mocs_compilation.cpp`
on a configuration change anymore was the main objective of
this patch.

In a similar fashion AUTORCC generates a `qrc_BASE_CMAKE.cpp`
file below `AUTOGEN_BUILD_DIR/include_$<CONFIG>/` and
`qrc_BASE.cpp` becomes a mere wrapper that includes this
actuall rcc output file (when using multi configuration
generators).

The template files `Modules/AutoRccInfo.cmake.in` and
`Modules/AutogenInfo.cmake.in` were removed in favor
of writing the info `.cmake` files manually.

Closes #17230
2018-02-02 09:10:40 +01:00
Brad King
3ffc9b99bb Merge topic 'UseSWIG-doc-clarify'
b844a414 UseSWIG: Clarify documentation of SWIG_OUTFILE_DIR
315b0927 UseSWIG: Improve documentation markup
ce130c7a UseSWIG: Convert docs to a bracket comment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1733
2018-02-01 08:04:52 -05:00