Commit Graph

10133 Commits

Author SHA1 Message Date
Brad King
d5fd396110 Merge topic 'FindOpenMP-clang-windows'
ceb5ee4a7b FindOpenMP: Add support for Clang on Windows
2dbff623f9 FindOpenMP: Save flags/libs in cache entries each time they are detected

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4327
2020-02-11 08:22:49 -05:00
Brad King
29423cde11 Merge topic 'FindPython-reduce-resources-comsumption'
3dab4682f6 FindPython: reduces consumption of resources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4338
2020-02-11 08:21:07 -05:00
Brad King
961d932a1b Merge topic 'swift-no-sdk-include'
5c2a92f44f Swift: Exclude SDK include paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4315
2020-02-11 08:20:03 -05:00
Brad King
a63f1c5c03 Merge topic 'FindMPI-fix-rerun'
b4d5ea8233 FindMPI: Preserve order of include directories on re-runs of CMake
8261ee3a9c FindMPI: Restore re-construction of include directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4341
2020-02-11 08:17:45 -05:00
Tim Hutton
ceb5ee4a7b FindOpenMP: Add support for Clang on Windows
Fixes: #19404
2020-02-10 17:20:19 -05:00
Tim Hutton
2dbff623f9 FindOpenMP: Save flags/libs in cache entries each time they are detected 2020-02-10 17:20:19 -05:00
Brad King
b4d5ea8233 FindMPI: Preserve order of include directories on re-runs of CMake
The fix in commit 5861c6d450 (FindMPI: Preserve include order when
extracting component directories, 2019-12-19) only works on the first
run of CMake in which we find MPI.  Extend the fix to save the compiler
wrapper's entire include path in our cache without splitting anything
out.  That way we can preserve the order when CMake re-runs.

Fixes: #20338
2020-02-10 11:14:42 -05:00
Brad King
8261ee3a9c FindMPI: Restore re-construction of include directories
The fix in commit 5861c6d450 (FindMPI: Preserve include order when
extracting component directories, 2019-12-19) only works on the first
run of CMake in which we find MPI.  It preserves the include directories
on the first run but still splits them up and saves the pieces in the
cache.  On future runs the pieces are not re-assembled, and we do not
know the order anyway.

Restore the re-assembly step so that at least all the include dirs are
available.  Leave preservation of the original order to later work.

Issue: #20338
2020-02-10 11:10:29 -05:00
Yauheni Khnykin
5c2a92f44f Swift: Exclude SDK include paths
Populate `CMAKE_Swift_IMPLICIT_INCLUDE_DIRECTORIES` with the macOS SDK's
include directory so that we filter such implicit directories out of
Swift targets.

Fixes: #19845
2020-02-10 10:32:37 -05:00
Marc Chevrier
3dab4682f6 FindPython: reduces consumption of resources
Stores more information in the cache to reduce the number
of sub-processes required on subsequent find_package calls.

Fixes: #20337
2020-02-10 12:41:04 +01:00
Robert Maynard
27b0d908d4 CUDAToolkit: Add support for cupti library
Fixes: #20318
2020-02-06 09:41:24 -05:00
Robert Maynard
c3d7f2e43b CUDAToolkit: Correct location of OpenCL doc link 2020-02-06 09:40:30 -05:00
Brad King
94be195a54 Merge topic 'llvm-rc-preprocess'
1c2d031cbd Add -E cmake_llvm_rc to preprocess files for llvm-rc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4219
2020-02-05 09:10:16 -05:00
Brad King
b27004231d Merge topic 'sdcc-no-default-target'
18d2e6fc8f SDCC: Remove default flags for a specific target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4321
2020-02-05 09:08:13 -05:00
Brad King
28013c9434 Merge topic 'cuda_remove_toolkit_dirs_from_implicit_includes'
87df637078 CUDA: Do not treat CUDA toolkit include directories as implicit

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4317
2020-02-04 08:30:12 -05:00
Brad King
37af0fac54 Merge topic 'compiler-abi-no-Werror'
d5895f50c3 CMakeDetermineCompilerABI: Avoid failing on warnings with -Werror

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4316
2020-02-04 08:29:30 -05:00
Brad King
451ce7e410 Merge topic 'swift-exe-exports'
1e26d57188 Ninja: properly handle exports from Swift exes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4314
2020-02-04 08:27:49 -05:00
Brad King
a8bcfddb2b Merge topic 'android-ndk-r19-binutils'
e3d3b7ddeb Android: Fix binutils selection with NDK r19+ unified toolchain

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4318
2020-02-04 08:26:40 -05:00
Thomas Bernard
1c2d031cbd Add -E cmake_llvm_rc to preprocess files for llvm-rc
llvm-rc requires preprocessed rc files. The CMake command line tool
cmake_llvm_rc enables channing the preprocessor call and the resource
compiler and make this appear as single compilation step.

When llvm-rc is detected as resource compiler, the RC compilation step
is set to use this command.
2020-02-04 08:19:12 -05:00
fruit
18d2e6fc8f SDCC: Remove default flags for a specific target
Remove defaults for a specific target (8051) because they are incorrect
for other targets.

Fixes: #20308
2020-02-04 07:25:24 -05:00
David Rohr
d5895f50c3 CMakeDetermineCompilerABI: Avoid failing on warnings with -Werror
Simply remove `-Werror` flags from `CMAKE_<LANG>_FLAGS` to avoid failing
ABI detection if there happen to be warnings in the test project.  For
example, `-Wunused-command-line-argument` warnings are common since the
ABI detection project may not exercise all the flags passed by users.

Fixes: #20305
2020-02-03 17:01:35 -05:00
Robert Maynard
87df637078 CUDA: Do not treat CUDA toolkit include directories as implicit
CMake properly detects the toolkit directories as implicit system
includes, but CUDA compilers don't add explicit `-isystem` markups to
these directories when compiling CUDA code.  Due to this limitation,
allow users to explicitly specify these directories as SYSTEM dirs.

Fixes: #16464, #19864
2020-02-03 14:59:26 -05:00
Brad King
e3d3b7ddeb Android: Fix binutils selection with NDK r19+ unified toolchain
In commit 97bca2f9fa (Android: Use unified toolchain in NDK r19+,
2019-07-26, v3.16.0-rc1~342^2) we hard-coded use of the unified
toolchain for NDK r19+ and skipped most of the old detection logic.
However, in that fast path we left out setting `_CMAKE_TOOLCHAIN_PREFIX`
for `CMakeFindBinutils` to select the matching binutils.  Add it.

Fixes: #20038
2020-02-03 14:35:12 -05:00
Brad King
b81aef19de Merge topic 'windows-gnu-asm'
97de48b528 Tests: Update Assembler code generation to select MSVC runtime library
6348ffb9e5 ASM: Hook up Windows-specific GNU/Clang compiler information modules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4287
2020-02-03 11:51:34 -05:00
Brad King
3a17ef5f23 Merge topic 'cpack-deprecate-old-macos-generators'
2ed00e8ef8 CPack: Deprecate OSXX11 generator
7bf187499f CPack: Deprecate PackageMaker generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4309
2020-02-03 11:46:01 -05:00
Brad King
ce7be22476 Merge topic 'blas-intel-mkl'
807a129f3c Find{BLAS,LAPACK}: Include parent of points directory in search
fe86dc43fe Find{BLAS,LAPACK}: Fixed an incorrect use of a macro argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4306
2020-02-03 11:45:05 -05:00
Brad King
999a8663c5 Merge topic 'aix-no-export-all'
afcd9fe669 AIX: Add an option to disable automatic exports from shared libraries
67f30811ce AIX: Improve name of internal symbol export list file
0ffd54f094 AIX: Add ExportImportList option to skip the object files
0dcfb63cb9 AIX: Revise ExportImportList to build output more incrementally

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4308
2020-02-03 11:32:01 -05:00
Brad King
095d50598b Merge topic 'findCUDAToolkit_correct_cudart_static_deps'
60bb7a54d5 CUDAToolkit: Add required static runtime library dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4294
2020-02-03 11:29:48 -05:00
Saleem Abdulrasool
1e26d57188 Ninja: properly handle exports from Swift exes
This adds logic to properly handle Swift executables.  Only executables
marked as exporting symbols will now generate module interfaces for the
executable.
2020-02-01 17:25:57 -08:00
Martin Storsjö
6348ffb9e5 ASM: Hook up Windows-specific GNU/Clang compiler information modules
This allows building .s/.S assembly code, and makes sure that the
`-fPIC` option isn't passed to the compiler (as it errors out on
Clang and causes a loud warning on GCC).
2020-01-31 14:37:34 -05:00
Brad King
2ed00e8ef8 CPack: Deprecate OSXX11 generator
The CPack OSXX11 generator has not had any updates since 2011 except as
part of sweeping maintenance changes.  It also creates packages with a
OSXScriptLauncher binary that has only ppc and i386 architectures which
are not supported by Apple anymore.  Furthermore, the generator is not
even mentioned in our documentation.  Add a deprecation warning.

Fixes: #20235
2020-01-31 10:04:41 -05:00
Brad King
7bf187499f CPack: Deprecate PackageMaker generator
Xcode no longer distributes the PackageMaker tools.
Add a deprecation warning when the generator is used.

Issue: #20235
2020-01-31 10:04:31 -05:00
Brad King
afcd9fe669 AIX: Add an option to disable automatic exports from shared libraries
Since commit 0f150b69d3 (AIX: Explicitly compute shared object exports
for both XL and GNU, 2019-07-11, v3.16.0-rc1~418^2~2) we always export
all symbols from shared libraries by default.  Add a new target property
called `AIX_EXPORT_ALL_SYMBOLS` that can be explicitly set to OFF to
suppress this behavior and export no symbols by default.

Fixes: #20290
2020-01-31 09:34:06 -05:00
Brad King
67f30811ce AIX: Improve name of internal symbol export list file 2020-01-31 09:28:07 -05:00
Brad King
0ffd54f094 AIX: Add ExportImportList option to skip the object files 2020-01-31 09:28:07 -05:00
Brad King
0dcfb63cb9 AIX: Revise ExportImportList to build output more incrementally
This will allow more steps to be added.
2020-01-31 09:28:07 -05:00
Brad King
692527d3b7 Merge topic 'aix-skip-exports'
a17f6eff43 AIX: Restore pre-3.16 undocumented method to suppress exports with XL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4303
2020-01-31 09:14:00 -05:00
Mario Emmenlauer
807a129f3c Find{BLAS,LAPACK}: Include parent of points directory in search
This is required if MKLROOT points to the subdirectory .../mkl/ instead of
the root of an Intel MKL library installation. Only in this case the MKL
will be searched starting from the parent directory, to detect relevant
dependencies in parallel subdirectories, like 'compiler' and 'tbb'.
2020-01-31 11:36:07 +01:00
Mario Emmenlauer
fe86dc43fe Find{BLAS,LAPACK}: Fixed an incorrect use of a macro argument 2020-01-31 11:32:46 +01:00
Brad King
a17f6eff43 AIX: Restore pre-3.16 undocumented method to suppress exports with XL
In commit 0f150b69d3 (AIX: Explicitly compute shared object exports for
both XL and GNU, 2019-07-11, v3.16.0-rc1~418^2~2) we dropped use of the
old `CMAKE_XL_CreateExportList` cache entry for XL exports.  However,
some people were setting the value to an empty string as a way to
disable automatic export of symbols.  Restore this behavior when the
option is explicitly set to an empty string.

Issue: #20290
2020-01-30 11:38:17 -05:00
Robert Maynard
60bb7a54d5 CUDAToolkit: Add required static runtime library dependencies
CUDAToolkit now adds the correct libraries that are required by the
static runtime.
2020-01-30 10:18:21 -05:00
Vitaly Lipatov
c18ed7236d GNUInstallDirs: Warn when CMAKE_SYSTEM_NAME is not set
If a project writes `include(GNUInstallDirs)` before `project()` then
`CMAKE_SYSTEM_NAME` may not be set and an incorrect `LIBDIR` may be
computed.  Warn about this case.
2020-01-30 09:14:47 -05:00
Brad King
c46a26a4c9 Merge topic 'FindCUDAToolkit-target-guards'
916d54dfb3 FindCUDAToolkit: Fix behavior on multiple calls
b452e2bd6a FindCUDAToolkit: Fix CUDA::* target guard logic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4293
2020-01-29 10:24:41 -05:00
Brad King
4e0d69c142 Merge topic 'fortran-subdir-simplify'
a7b844d6d4 CMakeAddFortranSubdirectory: Simplfy logic to always build subdir

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4296
2020-01-29 10:23:19 -05:00
Brad King
0adc266594 Merge topic 'blas-intel-mkl'
4d7c69208e Find{BLAS,LAPACK}: Search always in dynamic linker paths
fde5fcbc71 Find{BLAS,LAPACK}: Avoid repeated setting of prefered library suffixes
fd1d4b823f Find{BLAS,LAPACK}: Fixed incorrect static library suffix for Apple
c60c847510 Find{BLAS,LAPACK}: Added support for MKL single dynamic library
59dbff6daa Find{BLAS,LAPACK}: Added support for static MKL required linker flags
6bd9cee638 Find{BLAS,LAPACK}: Fixed detection of MKL, and several MKL improvements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4246
2020-01-29 10:22:12 -05:00
Rodolfo Lima
916d54dfb3 FindCUDAToolkit: Fix behavior on multiple calls
Update `_CUDAToolkit_find_and_add_import_lib` to create and add
dependencies to a target in one step that shared a single guard against
repeated definitions.  Otherwise we were adding dependencies again on
every call.

Fixes: #20282
2020-01-28 14:21:24 -05:00
Rodolfo Lima
b452e2bd6a FindCUDAToolkit: Fix CUDA::* target guard logic
Issue: #20282
2020-01-28 14:21:24 -05:00
Brad King
a7b844d6d4 CMakeAddFortranSubdirectory: Simplfy logic to always build subdir
In the case that we use ExternalProject_Add to drive the subdirectory
build, replace the `forcebuild` step with the official `BUILD_ALWAYS`
option.

Issue: #20179
2020-01-28 13:57:05 -05:00
Brad King
1d08099be7 Merge topic 'FindBoost-delay-helper-targets'
e0e87b9d70 FindBoost: Do not add any Boost targets until after Boost found

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alexander Grund <github@grundis.de>
Merge-request: !4280
2020-01-28 11:02:41 -05:00
Brad King
193352e420 Merge topic 'clang-tidy-driver-mode'
f6f4eb0907 clang-tidy: Add driver mode argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4208
2020-01-28 11:01:19 -05:00