Commit Graph

9652 Commits

Author SHA1 Message Date
Brad King
7290cea75b Merge topic 'FindLibLZMA-windows-debug'
232f5bd644 FindLibLZMA: Find debug/release variants on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3714
2019-08-26 10:45:28 -04:00
Brad King
1811f2b371 Merge topic 'cpack-stgz-license-prompt'
4c8741eb86 CPack/STGZ: Require explicit acceptance or refusal of license

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3717
2019-08-26 10:37:18 -04:00
Braden McDaniel
232f5bd644 FindLibLZMA: Find debug/release variants on Windows 2019-08-23 11:19:21 -04:00
sidju
4c8741eb86 CPack/STGZ: Require explicit acceptance or refusal of license
To make using the generated STGZ easier, require a specific answer to
accepting the license terms.  Since more moves down one line when '\n'
is entered a user may hold enter to paginate through the document. This
change prevents the user from accidentally refusing the license terms by
holding enter for too long and having to start over.
2019-08-23 11:04:26 -04:00
Brad King
19612dffd2 Merge topic 'solaris-ldd'
3bb7453436 GetPrerequisites: match ldd output on Solaris

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3695
2019-08-23 10:11:47 -04:00
Brad King
76891a4a7a Merge topic 'CrayPrgEnv-update-link-type-detection'
971c778213 CrayPrgEnv: Change default linking mode based on PE version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3716
2019-08-23 10:05:52 -04:00
Chuck Atkins
971c778213 CrayPrgEnv: Change default linking mode based on PE version
Beginning with the 19.06 release of the Cray Programming Environment, the
default linking mode on XC Cray systems is dynamic instead of static.
This updates the CrayPrgEnv compiler wrappers to detect the PE version
being used and behave accordingly.
2019-08-22 12:26:06 -04:00
Brad King
6e1ff50efb Merge topic 'FindBoost-clarify-header-only'
0148f1a867 FindBoost: Add note about header-only libs in warning msg

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3712
2019-08-22 10:16:10 -04:00
Brad King
bce0d4c27d Merge topic 'FindBZip2-windows-lib-names'
5edceff308 FindBZip2: Add Windows library names emitted from bzip2 1.0.6 makefile

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3711
2019-08-21 12:01:32 -04:00
Braden McDaniel
5edceff308 FindBZip2: Add Windows library names emitted from bzip2 1.0.6 makefile
As of release 1.0.6, the bzip2 distribution includs a makefile for nmake
on Windows that emits library names of the form `libbz2.lib`.
2019-08-21 12:00:11 -04:00
Brad King
2ad09c5ddd Merge topic 'ProcessorCount-solaris'
1c87bc60ee ProcessorCount: Fix virtual processor count on Solaris

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3694
2019-08-21 10:51:48 -04:00
Brad King
e15a9187b0 Merge topic 'FindCUDA-nvcc-include-dir-backslash'
76b76a7f9b FindCUDA: Fix support for backslashes in CUDA_NVCC_INCLUDE_DIRS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3679
2019-08-21 10:49:50 -04:00
Brad King
01c7c4236a Merge topic 'FindMPI-restore-flag-vars'
31b8b28fed FindMPI: Restore MPI_<LANG>_COMPILE_FLAGS and MPI_<LANG>_COMPILE_OPTIONS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3710
2019-08-21 10:28:33 -04:00
Robert Maynard
31b8b28fed FindMPI: Restore MPI_<LANG>_COMPILE_FLAGS and MPI_<LANG>_COMPILE_OPTIONS
In commit e374b9f1eb (FindMPI: Restore MPI_<LANG>_COMPILE_FLAGS as a
command-line string, 2018-09-10, v3.12.3~6^2) we tried to restore the
compile flags but accidentally inverted the arguments to `list(JOIN)`
causing both `MPI_<LANG>_COMPILE_FLAGS` and `MPI_<LANG>_COMPILE_OPTIONS`
to be empty.

Issue: #18349
2019-08-21 10:08:12 -04:00
Jon Chronopoulos
3bb7453436 GetPrerequisites: match ldd output on Solaris
Solaris output is the following:

```
$ ldd /lib/libxml2.so
libz.so.1 =>     /lib/libz.so.1
libm.so.2 =>     /lib/libm.so.2
libc.so.1 =>     /lib/libc.so.1
```

While on Linux

```
$ ldd /usr/lib/libxml2.so
linux-vdso.so.1 (0x00007ffe02bbe000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f03ab852000)
libicuuc.so.64 => /usr/lib/libicuuc.so.64 (0x00007f03ab67a000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007f03ab463000)
liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f03ab23d000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f03ab0f7000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f03aaf34000)
/usr/lib64/ld-linux-x86-64.so.2 (0x00007f03ab9fd000)
libicudata.so.64 => /usr/lib/libicudata.so.64 (0x00007f03a94ee000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f03a94cd000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f03a92e5000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f03a92cb000)
```
2019-08-21 17:25:28 +10:00
Dennis Klein
0148f1a867 FindBoost: Add note about header-only libs in warning msg 2019-08-21 01:55:47 +02:00
Jon Chronopoulos
1c87bc60ee ProcessorCount: Fix virtual processor count on Solaris
The previous code did not count the number of virtual processors across
physical processors on SunOS.

Can handle the following situations:

```
$ uname -a
SunOS solaris 5.11 11.4.0.15.0 i86pc i386 i86pc
$ psrinfo -p -v
The physical processor has 1 virtual processor (0)
  x86 (GenuineIntel 306D2 family 6 model 61 step 2 clock 3492 MHz)
        Intel Core Processor (Broadwell)
The physical processor has 1 virtual processor (1)
  x86 (GenuineIntel 306D2 family 6 model 61 step 2 clock 3492 MHz)
        Intel Core Processor (Broadwell)
The physical processor has 1 virtual processor (2)
  x86 (GenuineIntel 306D2 family 6 model 61 step 2 clock 3492 MHz)
        Intel Core Processor (Broadwell)
The physical processor has 1 virtual processor (3)
  x86 (GenuineIntel 306D2 family 6 model 61 step 2 clock 3492 MHz)
        Intel Core Processor (Broadwell)
```

```
$ uname -a
SunOS sol11x86 5.11 11.0 i86pc i386 i86pc
$ psrinfo -p -v
The physical processor has 2 virtual processors (0 1)
  x86 (GenuineIntel 50650 family 6 model 85 step 0 clock 2000 MHz)
        Intel(r) Xeon(r) Gold 6138 CPU @ 2.00GHz
```

```
$ uname -a
SunOS sol11 5.11 11.0 sun4v sparc sun4v
$ psrinfo -p -v
The physical processor has 2 cores and 16 virtual processors (0-15)
  The core has 8 virtual processors (0-7)
  The core has 8 virtual processors (8-15)
    SPARC-T4 (chipid 0, clock 2848 MHz)
```
2019-08-20 10:26:06 -04:00
Hong Xu
76b76a7f9b FindCUDA: Fix support for backslashes in CUDA_NVCC_INCLUDE_DIRS
Backslashes in `CUDA_NVCC_INCLUDE_DIRS` cause syntax errors because it
is written to a generated `.cmake` script as a string literal.  Use a
bracket argument to hold the expanded value as we already do for
`CUDA_NVCC_COMPILE_DEFINITIONS`.  Then explicitly convert backslashes to
forward slashes.
2019-08-20 09:47:29 -04:00
Brad King
8c1d3e3b79 Merge topic 'find_openacc_targets'
f4fc0667ae FindOpenACC: Provide import targets and OpenACC_<lang>_OPTIONS variable
9460501ad7 FindOpenACC: Provide a Fortran snippet that compiles with gfortran

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3670
2019-08-20 09:17:18 -04:00
Robert Maynard
f4fc0667ae FindOpenACC: Provide import targets and OpenACC_<lang>_OPTIONS variable
Previously the FindOpenACC module had issues where the contents of
OpenACC_<lang>_FLAGS could not be used with target_compile_options
when it contained multiple compiler flags.
2019-08-19 15:20:38 -04:00
Brad King
e3746821df Merge topic 'swift-mode-flags'
4d83e47c05 Swift: define `CMAKE_Swift_FLAGS` correctly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !3684
2019-08-19 15:08:22 -04:00
Brad King
e977867a12 Merge topic 'solaris_clang'
47937219ee Solaris: Add support for Clang compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3672
2019-08-19 14:56:14 -04:00
Brad King
29488892e5 Merge topic 'msvc-runtime-library-flang'
ea0294c281 Flang: Implement MSVC runtime library abstraction

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3674
2019-08-19 14:53:20 -04:00
Kyle Edwards
c41c79285b Merge topic 'swift-import-library-location'
5480f65ab1 Swift: honour `IMPLIB_LOCATION` property

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !3686
2019-08-19 13:25:16 -04:00
Kyle Edwards
7a92fb7bf6 Merge topic 'clang-llvm-rc'
cea253a38b Clang: Fall back to llvm-rc when rc is unavailable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !3687
2019-08-16 15:37:20 -04:00
Gregory Mitrano
cea253a38b Clang: Fall back to llvm-rc when rc is unavailable
This change modifies how CMAKE_RC_COMPILER is configured to improve
the out-of-box experience for developers using Clang on Windows.
The previous behavior was to require the user to explicitly specify
the resource compiler when CMake was called. The new behavior
is to automatically attempt to locate the MSVC rc binary and use that
if it's found. If rc is not available, CMake will now fall back to
Clang's llvm-rc binary.

With this change in place, trivial C/C++ programs can be generated
with Ninja and Clang on Windows without running into errors about
a missing resource compiler.

Fixes: #19318
2019-08-14 00:20:39 -04:00
Kyle Edwards
39d2ce4a71 Merge topic 'per-language-link-library-flag'
689be6235e Generator: support per-language link library flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3668
2019-08-13 10:05:40 -04:00
Kyle Edwards
dabd16926b Merge topic 'cuda_separable_compilation_determined_by_compiler_id'
a233e4e7d9 CUDA: Compilers can now state they don't require a device linking step

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3659
2019-08-13 09:56:47 -04:00
Saleem Abdulrasool
5480f65ab1 Swift: honour IMPLIB_LOCATION property
The rules did not account for the import library location (through
`<TARGET_IMPLB>`) and instead would always write the import library to
the default location (next to the shared library/executable).  This
prevented the use of `CMAKE_RUNTIME_OUTPUT_LOCATION` and
`CMAKE_ARCHIVE_OUTPUT_LOCATION`.
2019-08-11 22:29:49 -07:00
Saleem Abdulrasool
4d83e47c05 Swift: define CMAKE_Swift_FLAGS correctly
Invoke `cmake_initialize_per_config_variable` to ensure that build type
flags are properly initialised.
2019-08-11 17:59:52 -07:00
Robert Maynard
9460501ad7 FindOpenACC: Provide a Fortran snippet that compiles with gfortran
The original Fortran snippet would fail to compile with the error
message of:
```
  return 0;
         1
Error: Alternate RETURN statement at (1) is only allowed within a SUBROUTINE
```

We solve this by removing the early termination logic.
2019-08-09 14:54:16 -04:00
Libor Bukata
47937219ee Solaris: Add support for Clang compiler
Inspired-by: Rainer Orth
Fixes: #19456
2019-08-09 12:53:05 -04:00
Saleem Abdulrasool
689be6235e Generator: support per-language link library flag
This enables the use of MSVC and Swift on Windows in a single project.
MSVC uses no flag to indicate linked libraries while Swift uses `-l`.
Add support for a language specific link library flag which takes
precedence over the global `CMAKE_LINK_LIBRARY_FLAG` which preserves
compatibility with earlier releases.
2019-08-09 08:16:29 -07:00
Brad King
6f3c429ee8 Merge topic 'soname-darwin'
2171f6ec0e Swift: correct SONAME flag for Darwin targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3640
2019-08-09 10:30:45 -04:00
Brad King
1a901ed09e Merge topic 'fphsa-components-space'
e45187d525 FPHSA: Remove extra space in module components report

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex Turbov <i.zaufi@gmail.com>
Merge-request: !3655
2019-08-09 10:28:45 -04:00
Brad King
ea0294c281 Flang: Implement MSVC runtime library abstraction
In commit fb3370b6a1 (MSVC: Add abstraction for runtime library
selection, 2019-04-10, v3.15.0-rc1~229^2) we overlooked updating flags
for Flang on Windows.  Add them now and update the MSVCRuntimeLibrary
Fortran test to work with Flang.  Base the flags on those we already
use for the GNU-like Clang targeting the MSVC ABI.

Fixes: #19583
2019-08-09 10:18:54 -04:00
Brad King
dd53122be5 Merge topic 'FindPython-virtual-env'
7ed84b1e8f FindPython: ensure virtual environments are correctly handled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3649
2019-08-07 11:52:57 -04:00
Brad King
26f0f8bfca Merge topic 'FindGLEW-macOS'
feeb0381bc FindGLEW: Fix typo in verbose log message
ab822a9b48 FindGLEW: Add required OpenGL dependency in macOS
a8a3efa3be FindGLEW: Fix macOS library suffix selection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3656
2019-08-07 09:58:56 -04:00
Robert Maynard
a233e4e7d9 CUDA: Compilers can now state they don't require a device linking step 2019-08-06 15:44:15 -04:00
Brad King
a09d14bbce Merge topic 'cmake-dependent-option-doc'
d192caefff CMakeDependentOption: Document that 4th parameter follows if-syntax

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3643
2019-08-06 09:57:19 -04:00
Brad King
1c7a4f93dd Merge branch 'FindGLEW-macOS' into release-3.15
Merge-request: !3656
2019-08-06 09:53:42 -04:00
Claudio Fantacci
feeb0381bc FindGLEW: Fix typo in verbose log message 2019-08-06 09:49:03 -04:00
Claudio Fantacci
ab822a9b48 FindGLEW: Add required OpenGL dependency in macOS
macOS requires OpenGL as INTERFACE_LINK_LIBRARIES dependency
in the GLEW targets. This commit fixes this issue.
2019-08-06 09:49:03 -04:00
Claudio Fantacci
a8a3efa3be FindGLEW: Fix macOS library suffix selection
Fix logic added by commit a7d853868b (FindGLEW: Update implementation,
2019-03-13, v3.15.0-rc1~375^2~1) on macOS.  macOS is recognized as both
UNIX and APPLE.  Consequently, the library suffix for shared and static
library was set, respectively, as `.so` and `.a`, just like UNIX systems.
Fix this by properly checking the OS type.

Fixes: #19542
2019-08-06 09:47:35 -04:00
Brad King
6f359e120f Merge topic 'clang-frontend-variant'
a245479372 clang: Work around toolchain file use of internal CMake variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3650
2019-08-06 09:41:38 -04:00
Sylvain Joubert
e45187d525 FPHSA: Remove extra space in module components report 2019-08-06 12:42:06 +02:00
Saleem Abdulrasool
2171f6ec0e Swift: correct SONAME flag for Darwin targets
Adjust the build rules for Swift to fix the SONAME handling for Darwin.
2019-08-05 17:29:41 -07:00
Marc Chevrier
7ed84b1e8f FindPython: ensure virtual environments are correctly handled
Fixes: #19525
2019-08-05 18:20:29 +02:00
Hong Xu
d192caefff CMakeDependentOption: Document that 4th parameter follows if-syntax 2019-08-05 10:15:21 -04:00
Brad King
a245479372 clang: Work around toolchain file use of internal CMake variables
Since commit d44c0db0b2 (clang: setup correct configuration in gnu mode,
2019-02-20, v3.15.0-rc1~41^2~5) our Clang compiler information modules
need the `CMAKE_<LANG>_COMPILER_FRONTEND_VARIANT` variable that we
compute during compiler detection.  However, some existing toolchain
files set our internal `CMAKE_<LANG>_COMPILER_ID_RUN` variables and
block that detection, but do not set the new frontend variant variable.
Help them out by setting `CMAKE_<LANG>_COMPILER_FRONTEND_VARIANT` anyway.

Fixes: #19515, #19539
2019-08-05 09:43:00 -04:00