summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* FindBoost: Add support for Boost 1.75Brad King2021-02-031-2/+17
| | | | | | | | | | | | | | | | Update the list of known versions. Run the command cmake -DBOOST_DIR=/path/to/boost_1_75_0 \ -P Utilities/Scripts/BoostScanDeps.cmake to extract dependencies from the 1.75.0 source tree. They differ from 1.74's dependencies by the addition of dependencies of the json component, so add a new version block to FindBoost. Fixes: #21773
* FindCUDAToolkit: Restore use of CUDA_PATH environment variableRobert Maynard2021-02-031-1/+1
| | | | | | | | Refactoring in commit 7cc815a2a6 (CUDAToolkit: Detect CUDA SDK that don't have nvcc, 2020-07-24, v3.19.0-rc1~366^2) accidentally broke use of the `CUDA_PATH` environment variable. Fixes: #21740
* Intel: Replace deprecated Fortran flag -nofor_main with -nofor-mainBrad King2021-01-221-1/+1
| | | | | | | | | | The `-nofor_main` flag was originally added by commit ccdd3e943d (Fix Intel Fortran SHARED libraries on Linux, 2009-10-27, v2.8.2~915). Since then, Intel Fortran renamed the option to `-nofor-main` and deprecated the old name. The new name has been available for a long time, so we can just switch to it. Fixes: #21735
* Merge topic 'FindHDF5-silence-output' into release-3.19Brad King2021-01-211-3/+5
|\ | | | | | | | | | | | | | | b924669385 FindHDF5: silence STATUS messages when found with QUIET 2439a048b0 FindHDF5: avoid writing to the output when testing h5cc Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5722
| * FindHDF5: silence STATUS messages when found with QUIETBen Boeckel2021-01-201-3/+3
| |
| * FindHDF5: avoid writing to the output when testing h5ccBen Boeckel2021-01-201-0/+2
| | | | | | | | | | | | The execution of this tool can output error logs to the output during configure. This can then be caught by CTest and flagged as an error during the build.
* | GetPrerequisites: Include weak macOS dependenciesBianca van Schaik2021-01-201-1/+1
|/ | | | | | | Starting with Clang 12, `otool -L` adds `, weak` to weakly linked libraries. Update GetPrerequisites to recognize these. Issue: #21684
* IRSL: Install msvcp${v}${d}_atomic_wait.dll if available with CRTKelly Walker2021-01-151-0/+2
| | | | | | | VS now distributes these additional runtime libraries. Install them if available. Fixes: #21675
* Merge topic 'FindHDF5-dbg-and-rel' into release-3.19Brad King2021-01-061-1/+1
|\ | | | | | | | | | | | | 5267ba9d63 FindHDF5: Fix finding both debug and release libs Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5653
| * FindHDF5: Fix finding both debug and release libsKris Thielemans2021-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | Use `target_link_libraries` to set `INTERFACE_LINK_LIBRARIES` so that the `debug` and `optimized` keywords work. In commit a8e0a6b3e4 (FindHDF5: Port changes from VTK, 2020-06-10, v3.19.0-rc1~312^2~1) we added use of `HDF5_LIBRARIES`, but the value may contain `debug` and `optimized` keywords. Fixes: #21637
* | FindMPI: remove single quotes from include pathEduard Valeyev2021-01-041-0/+1
|/ | | | | | | Intel OneAPI's MPI wraps include paths into single quotes, remove them when sanitizing _MPI_INCLUDE_PATH Fixes: #21634
* FetchContent: Relative SOURCE_DIR override cannot be a hard errorCraig Scott2020-12-221-1/+8
| | | Fixes: #21624
* CMakePackageConfigHelpers: Relax restrictions on version rangeMarc Chevrier2020-12-143-29/+53
|
* Merge topic 'FindGLUT-macos-tbd' into release-3.19Brad King2020-12-141-2/+10
|\ | | | | | | | | | | | | d29d034e2e FindGLUT: Handle Mojave and Big Sur 'tbd' framework files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5601
| * FindGLUT: Handle Mojave and Big Sur 'tbd' framework filesRobert Maynard2020-12-111-2/+10
| |
* | macOS: Add /opt/homebrew to CMAKE_SYSTEM_PREFIX_PATH on Apple SiliconBrad King2020-12-111-0/+7
| | | | | | | | | | | | | | According to https://brew.sh/2020/12/01/homebrew-2.6.0/ the `/opt/homebrew` directory is recommended for installing ARM architecture brew packages. Fixes: #21585
* | macOS: Offer control over host architecture on Apple Silicon hostsBrad King2020-12-102-13/+41
|/ | | | | | | | | | | | | | | | | | | | | | | | | Since commit b6c60f14b6 (macOS: Default to arm64 architecture on Apple Silicon hosts, 2020-09-28, v3.19.0-rc1~63^2) we use `sysctl` to detect that we are running on Apple Silicon in a way that pierces Rosetta. This always sets `CMAKE_HOST_SYSTEM_PROCESSOR` to be `arm64` on such hosts. However, macOS offers strong support for running processes under an emulated `x86_64` architecture. Teach CMake to select either `arm64` or `x86_64` as the host architecture on Apple Silicon based on the architecture of its own process. When CMake is built as a universal binary, macOS will select whichever slice (architecture) is appropriate under the user's shell, and `CMAKE_HOST_SYSTEM_PROCESSOR` will match. Also offer a `CMAKE_APPLE_SILICON_PROCESSOR` variable and environment variable to provide users with explicit control over the host architecture selection regardless of CMake's own architecture. Finally, if `CMAKE_OSX_ARCHITECTURES` is not set, pass explicit flags to the toolchain to use selected host architecture instead of letting the toolchain pick. Fixes: #21554
* Merge topic 'ispc-system-includes' into release-3.19Brad King2020-12-101-2/+0
|\ | | | | | | | | | | | | 8da25e4a3c ISPC: Treat system includes as '-I' includes Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5591
| * ISPC: Treat system includes as '-I' includesRobert Maynard2020-12-091-2/+0
| | | | | | | | ISPC doesn't have specific syntax for system includes.
* | Merge topic 'FindPython-python2-soabi-suffix-fix' into release-3.19Brad King2020-12-081-2/+10
|\ \ | | | | | | | | | | | | | | | | | | afb0ffcac7 FindPython2: avoid doubling the extension in CPython2 SOABI Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5574
| * | FindPython2: avoid doubling the extension in CPython2 SOABIBen Boeckel2020-12-041-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 951640f1f9 (FindPython: manage SOABI for all Python versions, 2020-08-11) extended support for Python2's SOABI variable in order to support the PyPy interpreter as well. This caused a regression in the way that the SOABI variable was built up for the CPython interpreter. This caused the variable to be set to `.so` which ended up causing a doubling of the resulting `SOABI` variable in the end. Co-Author: Marc Chevrier <marc.chevrier@gmail.com> Fixes: #21548
* | | Revert "Intel: Add Intel DPC++ compiler identification"Brad King2020-12-072-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit 887f3a88a6 (Intel: Add Intel DPC++ compiler identification, 2020-09-21, v3.19.0-rc1~124^2). The compiler has already been released, and is more usable with CMake by pretending to be upstream Clang than by identifying it as a compiler for which we have not implemented support. Fixes: #21551
* | | Revert "Intel: Add Intel Clang compiler identification"Brad King2020-12-072-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit 5c3a93ab88 (Intel: Add Intel Clang compiler identification, 2020-09-29, v3.19.0-rc1~68^2). The compiler has already been released, and is more usable with CMake by pretending to be upstream Clang than by identifying it as a compiler for which we have not implemented support. Issue: #21551
* | | CMakeDetermineCompilerId: Tolerate stray text around INFO stringsBrad King2020-12-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When cross-compiling with Xcode our compiler id test binary may be compiled with multiple architectures. The INFO strings should be identical and therefore de-duplicated. However, this can be broken by stray text that happens to sit immediately before or after an INFO string. Filter out such text so we can match clean INFO strings. Fixes: #21526
* | | CMakeDetermineCompilerId: Add whitespace to clarify logicBrad King2020-12-031-1/+5
| | | | | | | | | | | | Also initialize a variable closer to its use.
* | | CMakeDetermineCompilerId: Filter IAR-AVR format INFO strings earlierBrad King2020-12-031-6/+7
| | | | | | | | | | | | Remove the bytes between characters from the entire list at once.
* | | Merge topic 'llvm-rc-preprocess-as-c' into release-3.19Brad King2020-12-031-5/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | f7ff0d34f0 llvm-rc: Force C language for the clang gnu frontend Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5564
| * | | llvm-rc: Force C language for the clang gnu frontendThomas Bernard2020-12-021-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When preprocessing the rc file using the clang gnu front end we need to force the source file type to a c file for the preprocessing to take place. Fixes: #21472
* | | | Merge topic 'FindHDF5-hdf5hl_fortran-variable' into release-3.19Brad King2020-12-021-2/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 175beadd4c FindHDF5: support the hdf5hl_fortran-based variable names adf108441e FindHDF5: improve error messages when a location variable isn't known Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5563
| * | | | FindHDF5: support the hdf5hl_fortran-based variable namesBen Boeckel2020-12-011-0/+4
| | | | | | | | | | | | | | | | | | | | Fixes: #21537
| * | | | FindHDF5: improve error messages when a location variable isn't knownBen Boeckel2020-12-011-2/+2
| |/ / /
* | | | Merge topic 'ti-c-only-standard' into release-3.19Brad King2020-12-021-3/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8eeddb1f0a Compiler/TI: Fix C standard flags in C-only project Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5558
| * | | | Compiler/TI: Fix C standard flags in C-only projectAdam Weisi2020-12-011-3/+3
| |/ / / | | | | | | | | | | | | Use our compiler architecture variable for C rather than CXX.
* | | | Cray: Fix Cray compiler detection on new platformsJustin LaPolla2020-12-013-5/+5
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Customer reported problems detecting the Cray compiler on their Apollo80 system. We were checking for the __CRAYXC and __CRAYXE predefined macros. These macros reflect the platform that the compiler is running on, i.e. Cray XC and Cray XE machines. Naturally, this didn't work on Apollo80. This commit uses the official Cray compiler identification macros which are defined on every platform: CCE Version C Macro C++ Macro Fortran Macro ============ ======== ========= ============= version < 9 _CRAYC _CRAYC _CRAYFTN version >= 9 __cray__ __cray__ _CRAYFTN
* | | Merge topic 'windows-clang-LINKER-prefix' into release-3.19Brad King2020-12-011-0/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 9ac9876757 Clang on Windows: 'LINKER:' prefix must be honored Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5551
| * | | Clang on Windows: 'LINKER:' prefix must be honoredMarc Chevrier2020-11-301-0/+3
| | | | | | | | | | | | | | | | Fixes: #21094
* | | | Merge topic 'correct_check_compiler_flag_regression' into release-3.19Brad King2020-11-303-7/+8
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 72f6b4bfbe Modules: Rename Internal/CMake{CheckCompiler => TryCompilerOrLinker}Flag Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Kumar Gala <kumar.gala@gmail.com> Merge-request: !5540
| * | | | Modules: Rename Internal/CMake{CheckCompiler => TryCompilerOrLinker}FlagRobert Maynard2020-11-253-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename the `CheckPIESupported` helper functions so that they don't clobber other internal functions. Also rename them to document they can't be unified with `CheckCompilerFlag`. Fixes: #21497
* | | | | Merge topic 'check-lang-conditions' into release-3.19Brad King2020-11-303-20/+20
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f3d4254b3d Check*: Tolerate variables set with names of languages 01d91ae5f2 Tests: Fix RunCMake.Check* conditions for enabling Fortran Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Robert Maynard <robert.maynard@kitware.com> Merge-request: !5536
| * | | | Check*: Tolerate variables set with names of languagesBrad King2020-11-253-20/+20
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the language checks added by commit 90dead024c (CheckCompilerFlag: unified way to check compiler flags per language, 2020-09-25, v3.19.0-rc1~88^2), commit 10ae907de0 (CheckSoureCompiles: Add a unified way to check if a source compiles, 2020-09-14, v3.19.0-rc1~118^2~1), and commit 357e2ef429 (CheckSoureRuns: Add a unified way to check if a source runs, 2020-09-14, v3.19.0-rc1~118^2) to work when variables of the language names are set. Fixes: #21500
* | | | Merge topic 'FPHSA-usable-outside-find_package' into release-3.19Marc Chevrier2020-11-281-2/+7
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | 14ecf9c2f6 FPHSA: ensure it can be used outside 'find_package' Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5539
| * | | FPHSA: ensure it can be used outside 'find_package'Marc Chevrier2020-11-251-2/+7
| | | | | | | | | | | | | | | | Fixes: #21505
* | | | Merge topic 'cuda_detect_vs_codegen' into release-3.19Brad King2020-11-251-4/+8
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | 20807a1882 CUDA: Fix user-set architectures during detection with Visual Studio Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5531
| * | | CUDA: Fix user-set architectures during detection with Visual StudioRaul Tambre2020-11-251-4/+8
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user specifies CMAKE_CUDA_ARCHITECTURES we use those during detection and error out if they don't work. For Visual Studio a dummy project file is used instead of invoking the compiler directly. NVCC would thus use its default and we'd fail if CMAKE_CUDA_ARCHITECTURES was anything other than NVCC's default. Use the necessary project file variable in CMakeDetermineCompilerId.cmake to match other generators. Fixes #21492.
* | | Merge topic 'cuda_11' into release-3.19Brad King2020-11-231-4/+6
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 046e454fdd CUDA: Error if can't determine toolkit library root 440dc98b07 CUDA: Clang CUDA 11.1 support Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5525
| * | | CUDA: Error if can't determine toolkit library rootRaul Tambre2020-11-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Finding the toolkit is required for Clang and is assumed to have been correctly found by FindCUDAToolkit if the CUDA language is found. Error out early with an useful error instead of failing later on due to the path not being set.
| * | | CUDA: Clang CUDA 11.1 supportRaul Tambre2020-11-221-4/+4
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | version.txt is gone from CUDA 11.1 installations, but the rest is the same. Instead of looking for version.txt look for <CUDA path>/nvvm/libdevice, which is the main thing that Clang requires (though it also checks for the existence of bin and include). Fixes #21353.
* | | Merge topic 'FindGTest-revert-no-release' into release-3.19Brad King2020-11-231-28/+12
|\ \ \ | |/ / |/| | | | | | | | | | | | | | 64dc4efc51 FindGTest: Revert "Allow either "Debug" or "Release" configurations." Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5520
| * | FindGTest: Revert "Allow either "Debug" or "Release" configurations."Brad King2020-11-201-28/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit a064b18f85 (FindGTest: Allow either "Debug" or "Release" configurations., 2020-06-29, v3.19.0-rc1~584^2). If both configurations are found then `GTEST_LIBRARY` is populated in a way that breaks `__gtest_determine_library_type`, and the imported target is not created correctly. Fixes: #21473 Issue: #17799
* | | Revert "specify language flag when source LANGUAGE property is set"Brad King2020-11-1912-24/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit 74b1c9fc8e (Explicitly specify language flag when source LANGUAGE property is set, 2020-06-01, v3.19.0-rc1~722^2) and the lookup tables from its two immediate ancestors. The purpose of that change was to convert an explicit `LANGUAGE` source file property into an explicit language specification compiler flag like `-x c`. This seems reasonable since the property is documented as meaning "indicate what programming language the source file is". It is also needed to help compilers deal with non-standard source file extensions they don't recognize. However, some projects have been setting `LANGUAGE C` on `.S` assembler source files to mean "use the C compiler". Passing `-x c` for them breaks the build because the `.S` sources are not written in C. These projects should be updated to use `enable_language(ASM)`, for which CMake often chooses the C compiler as the assembler when using toolchains that support it (which would have to be the case for projects using the approach). Revert the change for now to preserve the old behavior for such projects. We can re-introduce it with a policy in a future version of CMake. Fixes: #21469 Issue: #14516, #20716