summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* enable_language: Assume compiler works if ABI detection compilesBrad King2020-05-256-258/+262
| | | | | | | | | | | | | | | We run a `try_compile` with a tiny test source to check if the compiler works so that we can fail early if it does not. When the compiler does work, we immediately `try_compile` the ABI detection source. In the common case that both steps work, we gain no useful information from the first one and the work was wasted. Re-order the checks to try the ABI detection first. If it works then assume the compiler works and skip the dedicated check. If the ABI check fails then proceed with the normal test for a working compiler so the diagnostic can be shown as before. Fixes: #18703
* CMakeDetermineCompilerABI: Fold copy error into CMAKE_<LANG>_ABI_COMPILEDBrad King2020-05-251-1/+4
|
* Merge topic 'CheckLinkerFlag-module'Brad King2020-05-251-0/+81
|\ | | | | | | | | | | | | | | af96c0f4fa CheckLinkerFlag: Add module to check validity of linker flags 3c4cc77d55 Tests: Extend Fortran compiler information Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4777
| * CheckLinkerFlag: Add module to check validity of linker flagsMarc Chevrier2020-05-251-0/+81
| | | | | | | | Fixes: #15934
* | Merge topic 'ep-git-update-strategy'Brad King2020-05-252-165/+261
|\ \ | | | | | | | | | | | | | | | | | | | | | 0aea435aa1 ExternalProject: Provide choice of git update strategies ea410414c5 ExternalProject: factor out gitupdate step to separate file Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4239
| * | ExternalProject: Provide choice of git update strategiesCraig Scott2020-05-232-11/+100
| | | | | | | | | | | | | | | Fixes: #16528 Co-Authored-By: Michael Wake <macwake@gmail.com>
| * | ExternalProject: factor out gitupdate step to separate fileCraig Scott2020-05-232-163/+170
| |/ | | | | | | | | | | | | | | The refactoring exposed that the original implementation was referring to an undefined variable src_name, which was previously only used in error messages. This has been fixed as part of the refactoring work. Fixes: #20336
* | Merge topic 'FindSquish_settingsgroup_removal'Brad King2020-05-254-16/+10
|\ \ | | | | | | | | | | | | | | | | | | 8492ac1363 FindSquish: Remove settingsGroup argument Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4763
| * | FindSquish: Remove settingsGroup argumentFrederik Gladhorn2020-05-194-16/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This argument never worked and was not passed on Windows, which is why the Windows version needs fewer fixups (and used to work independent of this change). On Linux (and macOS) it was passed and prevented the server from starting and the test would not be able to run. See also comments on https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4648
* | | Merge topic 'cuda-runtime-cleanup'Brad King2020-05-252-29/+27
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | bcb44ac2ee CUDA: Simplify Clang implicit host linker settings 23519dd24f CUDA: Fix implicit runtime library filtering on Windows 16bed00712 CUDA: Refactor implicit library filtering 5c7ca6f8a8 CUDA: Move VS CudaRuntime selection to be with rest of CUDA options 4468acb979 CUDA: Factor runtime library lookup into helper method Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Robert Maynard <robert.maynard@kitware.com> Merge-request: !4776
| * | CUDA: Simplify Clang implicit host linker settingsBrad King2020-05-221-14/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of `CMAKE_CUDA_HOST_IMPLICIT_LINK_*` is to capture the extra link libraries and directories that the CUDA compiler passes when invoking the host linker. We need this when using NVCC because CMake drives the host linker directly rather than through NVCC. However, this is not needed with Clang because: * Clang does not pass any CUDA libraries automatically. * We drive linking with the Clang compiler anyway. Drop the detection logic for Clang because it only gives the normal C++ runtime libraries which we do not need here.
| * | CUDA: Fix implicit runtime library filtering on WindowsBrad King2020-05-221-3/+3
| | | | | | | | | | | | | | | The CUDA runtime library names may have a `.lib` suffix. Exclude those too.
| * | CUDA: Refactor implicit library filteringBrad King2020-05-222-15/+21
| | | | | | | | | | | | | | | | | | Filter CMAKE_CUDA_HOST_IMPLICIT_LINK_LIBRARIES just after it is computed. Re-use the same exclusion list for filtering CMAKE_CUDA_IMPLICIT_LINK_LIBRARIES to avoid duplication.
* | | Merge topic 'fortran-preprocess-property'Brad King2020-05-2212-0/+37
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3888de23da Ninja: Skip Fortran preprocessing if Fortran_PREPROCESS is OFF 66c4e87282 Ninja: Add helper functions to generate Fortran build 5cca1ec893 Ninja: Add helper functions to generate Fortran preprocess rule b0a6161190 Fortran: Add Fortran_PREPROCESS property Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4659
| * | | Fortran: Add Fortran_PREPROCESS propertyPeter Hill2020-05-2112-0/+37
| | | | | | | | | | | | | | | | Issue: #18870
* | | | Merge topic 'support_conda_env'Brad King2020-05-221-0/+4
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | 50879ce412 Conda: Add CONDA_PREFIX as an acceptable system prefix path cd9c3c000f Tests: Update QtAutogen codeeditor test only include headers needed d806bd2e8c Tests: Update test suite to run in an Anaconda environment Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4773
| * | | Conda: Add CONDA_PREFIX as an acceptable system prefix pathRobert Maynard2020-05-211-0/+4
| | | |
* | | | Merge topic 'cuda-default-runtime'Brad King2020-05-225-3/+35
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d8eee80e30 Merge branch 'backport-cuda-default-runtime' into cuda-default-runtime e55b21e24e CUDA: Compute CMAKE_CUDA_RUNTIME_LIBRARY default from toolchain 1086e930dc CUDA: Propagate CMAKE_CUDA_RUNTIME_LIBRARY state to try_compile a4ea293153 Help: Correct CMAKE_CUDA_RUNTIME_LIBRARY applicability Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4762
| * \ \ \ Merge branch 'backport-cuda-default-runtime' into cuda-default-runtimeBrad King2020-05-225-3/+35
| |\ \ \ \ | | |/ / / | |/| | |
| | * | | CUDA: Compute CMAKE_CUDA_RUNTIME_LIBRARY default from toolchainRobert Maynard2020-05-215-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 0d0145138f (CUDA: Add abstraction for cuda runtime selection, 2019-11-29, v3.17.0-rc1~83^2) we add CUDA runtime library selection flags by default. To maintain backwards compatibility the default CUDA runtime library needs to be computed based on what libraries are found on the initial compiler invocation. For example a toolchain could establish initial flags that have all CUDA compilations using the runtime version, and if we don't detect this we will try to link to both the static and shared runtime. Co-Author: Brad King <brad.king@kitware.com> Fixes: #20708
* | | | | Merge topic 'FindPython-debug-library-lookup'Brad King2020-05-211-0/+6
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 596db17cdd Merge branch 'backport-3.17-FindPython-debug-library-lookup' into FindPython-debug-library-lookup e7b9f928f7 FindPython: use CMAKE specific variables to look-up debug library 71e6854b22 FindPython: use CMAKE specific variables to look-up debug library Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4764
| * | | | FindPython: use CMAKE specific variables to look-up debug libraryMarc Chevrier2020-05-181-0/+6
| | | | | | | | | | | | | | | | | | | | Fixes: #20714
* | | | | Merge topic 'doc-CMAKE_SYSTEM_PREFIX_PATH'Craig Scott2020-05-202-0/+11
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6b3d8f281e Document which environment variables effect CMAKE_SYSTEM_PREFIX_PATH Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4748
| * | | | | Document which environment variables effect CMAKE_SYSTEM_PREFIX_PATHRobert Maynard2020-05-192-0/+11
| | | | | |
* | | | | | Merge topic 'FindHDF5-cleanup'Brad King2020-05-191-232/+244
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8fa58aea77 FindHDF5: Clean variables and output Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4759
| * | | | | FindHDF5: Clean variables and outputSeth R Johnson2020-05-181-232/+244
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The module's functionality is preserved. Perform cleanups: - Format some functions - Change macros to functions - Fix return value check from execute_process - Hide status messages unless HDF5_FIND_DEBUG is enabled - Normalize TRUE/FALSE capitalization Fixes: #20718
* | | | | Merge topic 'fetchcontent-SOURCE_SUBDIR'Brad King2020-05-181-12/+58
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 592085b94b FetchContent: Add support for SOURCE_SUBDIR Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4757
| * | | | | FetchContent: Add support for SOURCE_SUBDIRCraig Scott2020-05-161-12/+58
| |/ / / / | | | | | | | | | | Fixes: #19875
* | | | | Merge topic 'cuda-clang'Brad King2020-05-189-250/+355
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a653ca9504 Tests: Update CUDA tests to work with Clang 5df21adf46 CUDA: Add support for Clang compiler dc2eae1f91 FindCUDAToolkit: Factor out discovery code into a separate file 70be10cbf4 CUDA: Remove toolkit include dirs from implicit include dirs only with NVIDIA Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Artem Belevich <tra@google.com> Acked-by: Robert Maynard <robert.maynard@kitware.com> Acked-by: Axel Huebl <axel.huebl@plasma.ninja> Acked-by: friendnick <ikoval67@gmail.com> Acked-by: Patrik Huber <patrikhuber@gmail.com> Merge-request: !4442
| * | | | | CUDA: Add support for Clang compilerRaul Tambre2020-05-157-22/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When crosscompiling we pass the sysroot. We need to try various architecture flags. Clang doesn't automatically select one that works. First try the ones that are more likely to work for modern installations: * <=sm_50 is deprecated since CUDA 10.2, try sm_52 first for future compatibility. * <=sm_20 is removed since CUDA 9.0, try sm_30. Otherwise fallback to Clang's current default. Currently that's `sm_20`, the lowest it supports. Separable compilation isn't supported yet. Fixes: #16586
| * | | | | FindCUDAToolkit: Factor out discovery code into a separate fileRaul Tambre2020-05-152-218/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows for re-use in other parts of the code, that require the CUDA toolkit location, but can't or may not want to use the full `FindCUDAToolkit`.
| * | | | | CUDA: Remove toolkit include dirs from implicit include dirs only with NVIDIABrad King2020-05-151-10/+12
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The special case added by commit 87df637078 (CUDA: Do not treat CUDA toolkit include directories as implicit, 2020-02-02, v3.17.0-rc1~31^2) breaks CMake's protections against changing the compiler's implicit include directory order. Do this only for the NVIDIA compiler where it is needed as a workaround to another problem. That compiler does not put the host compiler's implicit include directories in `-I` paths so we do not detect them as `CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES` anyway.
* | | | | Merge topic 'FindOpenSSL-applink'Brad King2020-05-181-0/+47
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | 7b83ca816a FindOpenSSL: add target OpenSSL::applink to support OpenSSL's applink feature Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4737
| * | | | FindOpenSSL: add target OpenSSL::applink to support OpenSSL's applink featuregnaggnoyil2020-05-151-0/+47
| | | | | | | | | | | | | | | | | | | | Fixes: #20701
* | | | | Merge topic 'objc-env-vars'Brad King2020-05-152-18/+24
|\ \ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 13ea190725 Help: Add 3.17.3 release note for Objective C/C++ compiler selection 16bf978e0c Merge branch 'backport-3.16-objc-env-vars' into objc-env-vars 67b9f55d46 Objective C/C++: Honor CC and CXX env vars to select compiler ab9be6662f Help: Document OBJC and OBJCXX env vars for Objective C/C++ compilers Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4746
| * | | | Merge branch 'backport-3.16-objc-env-vars' into objc-env-varsBrad King2020-05-142-18/+24
| |\ \ \ \
| | * | | | Objective C/C++: Honor CC and CXX env vars to select compilerBrad King2020-05-142-18/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the `OBJC` or `OBJCXX` environment variable is not set to specify an Objective C or C++ compiler, check `CC` or `CXX` too. Fixes: #20703
| * | | | | Merge topic 'fix-cache-args-file-to-dep-list' into release-3.17Brad King2020-05-131-0/+4
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0199dd9f1b ExternalProject: expose _ep_cache_args_script to the caller Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4710
| * \ \ \ \ \ Merge topic 'pch-msvc-pragma' into release-3.17Brad King2020-05-121-7/+5
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6c2514dabe MSVC: Use 'pragma system_header' in PCH only on cl 19.13 and above Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4736
| * \ \ \ \ \ \ Merge topic 'FindGTK2-harfbuzz-target' into release-3.17Brad King2020-05-111-3/+6
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5ab137b7e9 FindGTK2: Add harfbuzz target for dependency from pango Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4725
| * | | | | | | | FindPython: ensure any specified version is correctly handledMarc Chevrier2020-05-071-43/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: #20674
| * | | | | | | | Merge topic 'FindPkgConfig-isystem' into release-3.17Brad King2020-05-061-8/+42
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e9d93c3731 Help: Add 3.17 release note for FindPkgConfig '-isystem' fix dfaaae67a3 Merge branch 'backport-3.16-FindPkgConfig-isystem' 4d446c68d1 FindPkgConfig: also handle "-isystem" prefixes for include directories Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4693
| | * \ \ \ \ \ \ \ Merge branch 'backport-3.16-FindPkgConfig-isystem'Brad King2020-05-061-8/+42
| | |\ \ \ \ \ \ \ \
| | | * | | | | | | | FindPkgConfig: also handle "-isystem" prefixes for include directoriesRolf Eike Beer2020-05-051-8/+42
| | | | |_|_|/ / / / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: #20652
| * | | | | | | | | Merge topic 'CheckLanguage-cuda-host' into release-3.17Brad King2020-05-061-1/+1
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5b304a7503 CheckLanguage: Fix forwarding of CMAKE_CUDA_HOST_COMPILER Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Robert Maynard <robert.maynard@kitware.com> Merge-request: !4711
| * \ \ \ \ \ \ \ \ \ Merge topic 'FindBoost-1.73' into release-3.17Brad King2020-05-051-1/+5
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a1e04be913 FindBoost: Update MinGW compiler tag for Boost 1.73 Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Boris Basic <baljci@hotmail.com> Merge-request: !4706
| * \ \ \ \ \ \ \ \ \ \ Merge topic 'FindBoost-1.73' into release-3.17Brad King2020-05-051-1/+1
| |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5e8d66f431 FindBoost: Add 1.73 to known versions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4708
| * | | | | | | | | | | | FindPython: fix error on FPHSA callMarc Chevrier2020-04-291-7/+7
| | |_|_|/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: #20650
* | | | | | | | | | | | Merge topic 'FindSquish-add_test'Brad King2020-05-151-30/+23
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2137384202 FindSquish: Make squish_add_test work with any Squish version Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4648
| * | | | | | | | | | | | FindSquish: Make squish_add_test work with any Squish versionFrederik Gladhorn2020-05-131-30/+23
| | |_|_|_|_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the documentation (Squish 4 is from 2010, so people are likely using something newer) and let squish_add_test call either the v3 or v4 macro based on the detected Squish version. This cannot break things, since mixing incompatible versions would not have worked before.