Commit Graph

8933 Commits

Author SHA1 Message Date
Jakub Benda
fc149a72f7 FindBLAS: Support combination of gfortran and Intel MKL
The module FindBLAS now correctly chooses MKL BLAS libraries to search,
based on the compiler ID. The MKL libraries needed for BLAS functionality
are the following:

  libmkl_{gf|intel}_{lp64|ilp64}.{a|so}
  libmkl_{gnu|intel}_thread.{a|so}       (or libmkl_sequential.{a|so})
  libmkl_core.{a|so}
  libm
  libdl
  lib{gomp|iomp5}.{a|so}                 (only with libmkl_*_thread.*)

To achieve the goal, the following internal variables are defined and used:

  BLAS_mkl_INTFACE   = "gf" or "intel"   (based on compiler ID)
  BLAS_mkl_THREADING = "gnu" or "intel"  (based on compiler ID)
  BLAS_mkl_OMP       = "gomp" or "iomp5" (based on compiler ID)
  BLAS_mkl_LM        = "-lm"             (not set on Windows)
  BLAS_mkl_DL        = "-ldl"            (not set on Windows)

The default values for the first three of them are "intel" and "iomp5",
unless a Fortran compiler is loaded with CMAKE_Fortran_COMPILER_ID
equal to "GNU"; in such case the "gf", "gnu" and "gomp" values are used.

In non-Windows systems, the thread library as well as libm and libdl are
now added to the linker line to allow static linking of libgomp.
2018-11-18 16:59:03 +00:00
Jakub Benda
f0d52f55f1 FindBLAS: Consolidate duplicated code related to MKL on Windows
The code that decides which library suffix to use for MKL libraries
in Windows was in two places. This commit consolidates it in one place.
2018-11-18 14:52:13 +00:00
Brad King
b324743229 Merge topic 'cpack'
a26ac919ef Help: Explain interaction of cpack(1) and CPack.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2617
2018-11-15 13:49:58 -05:00
Joachim Wuttke (l)
a26ac919ef Help: Explain interaction of cpack(1) and CPack.
In particular, make clear that package/installer generators
are not the makefile generators of the cmake command.

Also insert sections in CPack doc, and capitalize section titles.
2018-11-15 16:50:52 +01: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
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
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
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
4c0d97dd98 GNUInstallDirs: Split "info" and "man" default logic
The conditions may soon differ.
2018-11-13 13:35:35 -05:00
Brad King
9fee704227 Merge topic 'SelectLibraryConfigurations'
fe15a1029c Help: Revise documentation of SelectLibraryConfigurations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2608
2018-11-13 10:46:54 -05:00
Brad King
06ef9edd51 Merge topic 'DeployQt4'
3a7f02197b Help: Downcase function names in DeployQt4 doc.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2600
2018-11-13 10:41:20 -05:00
Brad King
bd04db899f Merge topic 'WriteCompilerDetectionHeader'
0470ee96b1 Help: Remove duplication of function name.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2605
2018-11-13 10:40:38 -05:00
Brad King
9bb203ed0f Merge topic 'FindBoost-1.69'
5045cd82d0 FindBoost: Additional fixes for 1.69

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2601
2018-11-13 10:38:54 -05:00
Roger Leigh
5045cd82d0 FindBoost: Additional fixes for 1.69 2018-11-13 10:37:01 -05:00
Joachim Wuttke (l)
fe15a1029c Help: Revise documentation of SelectLibraryConfigurations
List format for chosen variables.

New paragraph before description of special cases.
2018-11-13 12:12:52 +01:00
Brad King
518b0cf3b6 Merge topic 'BundleUtilities'
96c31fad71 Help: Downcase functions in BundleUtilities

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2599
2018-11-12 16:36:01 -05:00
Brad King
68c86a20ce Merge topic 'FindPackageMessage'
89b5f4fcc7 Help: Correct macro -> function in FindPackageMessage.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2598
2018-11-12 16:34:24 -05:00
Joachim Wuttke (l)
0470ee96b1 Help: Remove duplication of function name. 2018-11-12 22:33:11 +01:00
Brad King
a39d6f6bc3 Merge topic 'CheckPrototypeDefinition'
f05d7ed5ff Help: correct macro -> function in CheckPrototypeDefinition

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2591
2018-11-12 16:33:10 -05:00
Brad King
f370254652 Merge topic 'DocumentationVTK'
36e9d2d124 Help: remove reference to inexistent file DocumentationVTK.cmake.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2597
2018-11-12 16:31:53 -05:00
Brad King
4884954413 Merge topic 'CMakeAddFortranSubdirectory'
b93b3b5500 Help: better summary and xrefs for CMakeAddFortranSubdirectory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2592
2018-11-12 16:31:03 -05:00
Brad King
45fb82483c Merge topic 'CMakePrintHelpers'
1c94129e98 Help: correct macro -> function in CMakePrintHelpers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2596
2018-11-12 16:29:56 -05:00
Brad King
72d54f1c53 Merge topic 'CPack-sections'
e286627334 Help: Insert section headers in CPack module

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2593
2018-11-12 16:26:11 -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
Joachim Wuttke (o)
3a7f02197b Help: Downcase function names in DeployQt4 doc. 2018-11-12 19:51:43 +01:00
Joachim Wuttke (o)
96c31fad71 Help: Downcase functions in BundleUtilities
Presumably, capitalization was left over from very old times
2018-11-12 15:49:31 +01:00
Joachim Wuttke (o)
f05d7ed5ff Help: correct macro -> function in CheckPrototypeDefinition
Correct in text, and downcase function name in function statement.
2018-11-12 15:41:09 +01:00
Joachim Wuttke (l)
89b5f4fcc7 Help: Correct macro -> function in FindPackageMessage.
Correct in the text, and change capitalization accordingly.
2018-11-12 15:34:41 +01:00
Joachim Wuttke (h)
e286627334 Help: Insert section headers in CPack module
The one extant section header was confusing at least:
Not all the doc page is on Variables.
2018-11-12 09:18:02 -05:00
Joachim Wuttke (l)
36e9d2d124 Help: remove reference to inexistent file DocumentationVTK.cmake. 2018-11-12 14:27:41 +01:00
Brad King
a16b24c9ce Merge topic 'FindODBC-mingw-avoid-hardcoded-odbc32'
4e4551f9f3 FindODBC: Do not assume odbc32.lib for MinGW

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2585
2018-11-12 08:19:32 -05:00
Brad King
a63a9363b2 Merge topic 'FindICU-link-dl'
1320122d3f FindICU: Add libdl to the link libraries for icu-uc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Francois Budin <francois.budin@kitware.com>
Merge-request: !2581
2018-11-12 08:18:47 -05:00
Brad King
baf8af10a7 Merge topic 'asm-compiler-id-clang'
c84fb4812d ASM: Detect compiler id for Clang used as Assembler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2584
2018-11-12 08:16:28 -05:00
Brad King
7704693e9a Merge topic 'FindBoost-compiler-guess-update'
b71667a395 FindBoost: Improve compiler prefix detection for GCC 5+ and clang 4+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2579
2018-11-12 08:14:48 -05:00
Joachim Wuttke (h)
1c94129e98 Help: correct macro -> function in CMakePrintHelpers
and apply lower case throughout
2018-11-11 23:18:37 +01:00
Joachim Wuttke (h)
b93b3b5500 Help: better summary and xrefs for CMakeAddFortranSubdirectory 2018-11-11 22:57:13 +01:00
Marc Chevrier
c4b4d8b3a6 POSITION_INDEPENDENT_CODE: Manage link flags for executables
Fixes: #14983, #16561
2018-11-11 17:34:09 +01:00
Mateusz Łoskot
4e4551f9f3 FindODBC: Do not assume odbc32.lib for MinGW
For MinGW, do not look for odbc32.lib but allow search for libodbc32.a.

Fixes: #18539
2018-11-09 19:49:05 +01:00
Mateusz Łoskot
b71667a395 FindBoost: Improve compiler prefix detection for GCC 5+ and clang 4+
Add recognition of compiler version and prefix for clang.
Accommodate changes to version numbering scheme for GCC 5+ and clang 4+
 - Minor number becomes patch, so excluded it from compiler prefix.
 - Improves searching for Boost 1.69+ libraries built with GCC 5+ and
   clang 4+, where library names are generated with compiler tag based on
   major version only eg. -gcc5 for GC 5.5.0 or -clang6 for clang 6.0.0
 - Follows up related changes in upcoming Boost 1.69
   https://github.com/boostorg/build/pull/349
Dump detected compiler version in Boost_DEBUG message.
Replace use of CMAKE_COMPILER_IS_GNUCXX with CMAKE_CXX_COMPILER_ID.
2018-11-09 11:52:43 -05:00
Brad King
a027128400 Merge topic 'FindBoost-link-threads'
bd831ed094 FindBoost: Add system thread library to Boost_LIBRARIES

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2570
2018-11-09 11:38:07 -05:00
Brad King
c84fb4812d ASM: Detect compiler id for Clang used as Assembler
Add missing vendor table entries for Clang and AppleClang to identify
them.  Previously this worked only if Clang was also enabled as a C or
CXX compiler first because we used to copy the C compiler id.  However,
that was removed by commit v3.13.0-rc1~44^2 (ASM: Search for full path
even when using C or C++ compiler, 2018-09-26).

Fixes: #18575
2018-11-09 11:34:34 -05:00
Felix Geyer
bd831ed094 FindBoost: Add system thread library to Boost_LIBRARIES
Add the system thread library to Boost_LIBRARIES when the boost thread
component has been found.

The Boost::thread imported target already pulls in Threads::Threads.
This changes does the same for projects using the Boost_LIBRARIES variable
instead.
2018-11-09 10:38:45 -05:00
Cameron Cawley
1320122d3f FindICU: Add libdl to the link libraries for icu-uc 2018-11-08 11:29:27 -05:00
Marc Chevrier
724a0346f7 POSITION_INDEPENDENT_CODE: Fix erroneous '-fPIE' flag for Sun Studio
Fixes: #16311
2018-11-08 14:58:57 +01:00
Brad King
a4add4eca2 Merge topic 'pkgconfig-mark-advanced'
f5c46dd84e PkgConfig: Be less verbose by mark(ing)_as_advanced the find_library result

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Rolf Eike Beer <eike@sf-mail.de>
Merge-request: !2576
2018-11-08 07:31:30 -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
Sylvain Joubert
f5c46dd84e PkgConfig: Be less verbose by mark(ing)_as_advanced the find_library result 2018-11-07 14:08:02 +01:00
Brad King
a67d1e824c Merge topic 'FindOpenMP-log-errors'
272c4c3dee FindOpenMP: Log error output
db0445f0c8 FindOpenMP: Fix warnings with -Wstrict-prototypes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Christian Pfeiffer <cpfeiffer@live.de>
Merge-request: !2574
2018-11-07 07:46:40 -05:00
Brad King
3bad96c988 Merge branch 'FindOpenMP-log-errors' into release-3.13
Merge-request: !2574
2018-11-07 07:41:34 -05:00
Ivan Pozdeev
272c4c3dee FindOpenMP: Log error output 2018-11-07 07:38:54 -05:00