summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* FindIntl: Improve documentation formattingSibi Siddharthan2021-03-261-17/+38
| | | | Backport from commit a9b11a06f5 (FindIntl: Add version support, 2021-02-23).
* Merge topic 'FindPkgConfig-NAMES_PER_DIR' into release-3.20Brad King2021-03-171-1/+4
|\ | | | | | | | | | | | | c7bd2d0d97 FindPkgConfig: Restore preference for first pkg-config in PATH Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5914
| * FindPkgConfig: Restore preference for first pkg-config in PATHBrad King2021-03-161-1/+4
| | | | | | | | | | | | | | | | | | | | Since commit ab8bd48352 (FindPkgConfig: Search for pkg-config.bat file on a Windows host, 2020-09-25, v3.19.0-rc1~98^2) we prefer `pkg-config.bat` over `pkg-config` regardless of the order they appear in the `PATH`. Tell `find_program` to consider all names in each directory so that the first one in `PATH` of any name wins. Issue: #21239
* | Merge topic 'FindOpenMP-IntelLLVM-Windows' into release-3.20Brad King2021-03-171-1/+6
|\ \ | | | | | | | | | | | | | | | | | | 6fd014a4b6 FindOpenMP: Use -Qiopenmp instead of -fiopenmp for IntelLLVM on Windows Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5904
| * | FindOpenMP: Use -Qiopenmp instead of -fiopenmp for IntelLLVM on WindowsWilliam R. Dieter2021-03-151-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Windows driver does not like the `-f` form of this option. Note that we prefer `-Qiopenmp/-fiopenmp` over `-Qopenmp/-fopenmp` in order to generate LLVM IR with parallelization information, which the backend uses to generate parallelized code. Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* | | FindMatlab: R2021a version mapMichael Hirsch2021-03-151-0/+1
|/ /
* | Merge topic 'cray-compiler-wrapper-detection' into release-3.20Brad King2021-03-113-5/+5
|\ \ | |/ | | | | | | | | | | 13144e82cd Cray: Enable Cray compiler wrapper detection on all platforms Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5897
| * Cray: Enable Cray compiler wrapper detection on all platformsJustin LaPolla2021-03-103-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously were checking for the `__CRAYXC` and `__CRAYXE` predefined macros. These macros reflect the platform that the compiler wrapper is running on, i.e. Cray XC and Cray XE machines. They are not defined on other platforms such as Apollo80. Switch to the `__CRAYXT_COMPUTE_LINUX_TARGET` macro. The Cray cc/CC/ftn wrappers always define this macro on the command line. This macro has been in use for many years, and is believed to be a reliable way to detect current and older Cray compiler wrappers. Fixes: #21904
* | Merge topic 'ep-fc-revert-refactoring' into release-3.20Brad King2021-03-1020-1782/+1087
|\ \ | | | | | | | | | | | | | | | | | | 57d442e182 Revert ExternalProject and FetchContent refactoring Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5898
| * | Revert ExternalProject and FetchContent refactoringCraig Scott2021-03-0920-1782/+1087
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring of the ExternalProject and FetchContent modules moved the commands into CMake scripts. This broke custom commands that used shell redirection or special build tool variables of the form $(MakeVar). Undo the sequence of commits that performed this refactoring and follow-up fixes associated with it. The following commits are reverted by this change: 4f3d1abbb4 (ExternalProject: Refactor pre-configure steps to support no-target uses, 2021-02-05) 17e5516e60 (FetchContent: Invoke steps directly and avoid a separate sub-build, 2021-01-29) bd876f3849 (FetchContent: Restore patch command support, 2021-02-18) 404cddb7bb (ExternalProject: Fix misuse of IS_NEWER_THAN in timestamp checks, 2021-02-21) b0da671243 (FetchContent: Don't update timestamps if files don't change, 2021-02-18) Fixes: #21892
* | | FindMatlab: Fix Matlab_LIBRARIES for MCRSilvio Traversaro2021-03-091-2/+9
|/ / | | | | | | | | | | | | In commit bda5e2ac8f (FindMatlab: Only include engine and dataarray libraries if they are found, 2020-12-11, v3.20.0-rc1~297^2~1) we fixed the imported target to contain optional libraries only if they are found. Do the same for `Matlab_LIBRARIES`.
* | Merge topic 'CrayPrgEnv-detection' into release-3.20Brad King2021-03-093-5/+5
|\ \ | |/ | | | | | | | | | | 23b101de60 Revert "Cray: Fix Cray compiler detection on new platforms" Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5889
| * Revert "Cray: Fix Cray compiler detection on new platforms"Brad King2021-03-083-5/+5
| | | | | | | | | | | | | | | | | | | | The justification in commit 9ee4a42813 (Cray: Fix Cray compiler detection on new platforms, 2020-12-01, v3.19.2~26^2) confuses detection of the CrayPrgEnv with identification of the Cray compiler. The change regressed detection of the CrayPrgEnv on non-Cray compilers. Revert it pending further investigation into the original problem. Fixes: #21894
* | Cray: Enable explicit Fortran preprocessing for Ninja generatorBrad King2021-03-051-0/+4
| | | | | | | | | | | | | | | | | | Cray 11.0 adds support for preprocessing with output written to a specified file (instead of always next to the source). Use it to enable Cray Fortran with the Ninja generator. Patch-by: James Elliott Fixes: #20731
* | Merge topic 'android-r22' into release-3.20Brad King2021-03-032-1/+40
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 005e2cdfb0 Android: Do not use gold for ndk >= r22 ed7a87f270 Tests: Update RunCMake.Android for NDK r22 4950d35733 Help: Document CMAKE_ANDROID_NDK_VERSION variable 746906242d Android: Detect NDK version number Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5862
| * | Android: Do not use gold for ndk >= r22Haibo Huang2021-03-031-1/+1
| | | | | | | | | | | | Fixes: #21772
| * | Android: Detect NDK version numberHaibo Huang2021-03-031-0/+39
| | | | | | | | | | | | Report it in `CMAKE_ANDROID_NDK_VERSION`.
* | | CMakeDetermineCompilerId: Fix REQUIRE_SUCCESS with multiple user flagsRaul Tambre2021-03-021-1/+1
| | | | | | | | | | | | Need to quote the list expansion otherwise we'll try each argument separately.
* | | Merge topic 'FindOpenGL-GLX-no-GLVND' into release-3.20Brad King2021-03-021-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | fb4b2ed0d3 FindOpenGL: handle GLX without GLVND Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5861
| * | | FindOpenGL: handle GLX without GLVNDBen Boeckel2021-02-261-1/+1
| |/ / | | | | | | | | | | | | | | | On Ubuntu, installing `libgl-dev` provides `libGL` and `libGLX`, but no `libOpenGL`. Avoid defining GLVND targets without the `OpenGL::OpenGL` target.
* | | CMakeDetermineCompilerId: Test without COMPILER_ID_FLAGS if REQUIRE_SUCCESSRaul Tambre2021-02-271-16/+34
|/ / | | | | | | | | | | | | If we REQUIRE_SUCCESS, i.e. TEST_FLAGS_FIRST must work, we need to also try without user flags. Fixes #21869.
* | PGI: Explicitly specify CMAKE_CXX98_STANDARD_COMPILE_OPTIONRobert Maynard2021-02-241-0/+2
| | | | | | | | | | | | | | | | | | The PGI ( and NVIDIA HPC ) compilers default C++ standard level are based on the GCC system headers it is compiling against. Therefore on newer platforms the default C++ level will be >= 11 and requesting C++98 compilation mode will fail as no explicit flag will be set.
* | Merge topic 'better_cuda_compiler_detection_error_messages' into release-3.20Brad King2021-02-241-5/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | a0fc64ac24 CUDA: Improve error messages when CUDA compiler detection fails Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Raul Tambre <raul@tambre.ee> Merge-request: !5844
| * | CUDA: Improve error messages when CUDA compiler detection failsRobert Maynard2021-02-231-5/+5
| | |
* | | Merge topic 'nag-fortran-include-moddir' into release-3.20Brad King2021-02-231-0/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | ec030877a2 NAG: Fix using Fortran modules from their output directory Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5842
| * | | NAG: Fix using Fortran modules from their output directoryBrad King2021-02-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NAG Fortran compiler's `-mdir` flag sets the module output directory but does not add the directory to the search path for using modules. This is inconsistent with other compilers like the GNU Fortran compiler's `-J` flag that does both. In order to make these consistent, add the module output directory with a `-I` flag on the NAG Fortran compiler so that it will be searched when using modules too. We already do this for the XL Fortran compiler since commit 210b0b99a9 (XL: Fix using Fortran modules from their output directory, 2020-02-28, v3.18.0-rc1~640^2~1).
* | | | Merge topic 'fix-IS_NEWER_THAN-usage' into release-3.20Brad King2021-02-223-6/+26
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | b0da671243 FetchContent: Don't update timestamps if files don't change 404cddb7bb ExternalProject: Fix misuse of IS_NEWER_THAN in timestamp checks Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5825
| * | | FetchContent: Don't update timestamps if files don't changeCraig Scott2021-02-221-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The refactoring in 17e5516e60 (FetchContent: Invoke steps directly and avoid a separate sub-build, 2021-01-29) uses a different way of writing out the step scripts and updating time stamps when steps are executed. That inadvertently always wrote out the scripts for custom commands, even when the contents didn't change. This caused their timestamp to always be updated, resulting in those steps always being seen as out-of-date and needing to be re-executed. The way timestamps were checked to determine whether to re-execute a step also did not adequately account for file systems which only have second-resolution timestamps. The IS_NEWER_THAN if condition also returns true when timestamps are the same, so one needs to use the negative form to get a true "is newer than" test. ExternalProject is not susceptible to this problem because it uses file(GENERATE) to write out the script files and that only updates the file's timestamp if the contents change. It also mostly leaves timestamp checking to the build tool.
| * | | ExternalProject: Fix misuse of IS_NEWER_THAN in timestamp checksCraig Scott2021-02-222-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When using a file system which only has second resolution timestamps, there is a reasonably high likelihood of timestamps being the same. The IS_NEWER_THAN test returns true when timestamps are the same, so don't redo downloads when they match exactly.
* | | | Merge topic 'intel-fortran-preprocess' into release-3.20Brad King2021-02-192-4/+20
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c9244f369a IntelLLVM: Make explicit Fortran preprocessing under Ninja more robust 056d4bf528 Merge branch 'backport-intel-fortran-preprocess' af074c266e Intel: Make explicit Fortran preprocessing under Ninja more robust Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5826
| * | | | IntelLLVM: Make explicit Fortran preprocessing under Ninja more robustBrad King2021-02-181-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tell the Fortran compiler to write preprocessor output directly to a file, as we do for the GNU compiler. The previous "redirect stdout" approach could break during ABI detection with some `mpif90` wrappers that add version information to stdout when called with `-v`. Issue: #21828
| * | | | Merge branch 'backport-intel-fortran-preprocess'Brad King2021-02-181-2/+10
| |\ \ \ \ | | | |_|/ | | |/| |
| | * | | Intel: Make explicit Fortran preprocessing under Ninja more robustBrad King2021-02-181-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tell the Fortran compiler to write preprocessor output directly to a file, as we do for the GNU compiler. The previous "redirect stdout" approach could break during ABI detection with some `mpif90` wrappers that add version information to stdout when called with `-v`. Fixes: #21828
* | | | | Merge topic 'fix-intel-compiler-check' into release-3.20Brad King2021-02-181-1/+1
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | dc7b6c2c06 DetermineCompiler: Fix copy-paste error in Intel Compiler detection Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5818
| * | | | DetermineCompiler: Fix copy-paste error in Intel Compiler detectionGregor Jasny2021-02-171-1/+1
| |/ / / | | | | | | | | | | | | | | | | Fixes: #21561 Fixes: a90d2a9eed (IntelLLVM: Add support for Intel LLVM-based compilers, 2020-11-02)
* | | | FetchContent: Restore patch command supportCraig Scott2021-02-171-1/+1
|/ / / | | | | | | | | | | | | | | | The refactoring in 17e5516e60 (FetchContent: Invoke steps directly and avoid a separate sub-build, 2021-01-29) contained a typo which resulted in any PATCH_COMMAND being ignored. Fix the typo and add a test case that would have caught the regression.
* | | Merge topic 'FindPython-fix-variable-handling' into release-3.20Brad King2021-02-161-2/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | 754f4f6876 FindPython: fix erroneous variable handling Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5816
| * | FindPython: fix erroneous variable handlingMarc Chevrier2021-02-161-2/+2
| | | | | | | | | | | | Fixes: #21817
* | | Merge topic 'FindPNG-advanced-variables' into release-3.20Brad King2021-02-161-2/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 17ae4e1bef FindPNG: only mark used variables as advanced Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5809
| * | | FindPNG: only mark used variables as advancedBen Boeckel2021-02-151-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | The `PNG_LIBRARY` variable is an output and not a cache variable. Fixes some CMP0102 warnings.
* | | | Merge topic 'IntelLLVM-unused-C17' into release-3.20Brad King2021-02-161-8/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4642c81c72 IntelLLVM: Remove incomplete C17 support Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Raul Tambre <raul@tambre.ee> Merge-request: !5805
| * | | | IntelLLVM: Remove incomplete C17 supportBrad King2021-02-151-8/+3
| |/ / / | | | | | | | | | | | | | | | | CMake does not yet model support for C17. Avoid possible confusion by removing the settings for IntelLLVM pending a full implementation.
* | | | Merge topic 'cuda-nvcc-output' into release-3.20Brad King2021-02-153-9/+12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9ea66b2d86 CUDA: Capture all nvcc output when extracting toolkit root Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Raul Tambre <raul@tambre.ee> Tested-by: Raul Tambre <raul@tambre.ee> Acked-by: Rong Ou <rong.ou@gmail.com> Merge-request: !5804
| * | | | CUDA: Capture all nvcc output when extracting toolkit rootBrad King2021-02-123-9/+12
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit fb2afef620 (CUDA: Support nvcc symlinking to ccache, 2021-01-07) and commit 3cef91a321 (CUDA: Always extract CUDA Toolkit root from nvcc verbose output, 2021-02-03) we always run the command `nvcc -v __cmake_determine_cuda` to look for the toolkit root in its stderr. On Windows, that command may print to stdout instead, so capture that as well.
* | | | Merge topic 'FindGDAL-improvements' into release-3.20Brad King2021-02-151-14/+45
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 55e493928b FindGDAL: add release note f4b53fadda FindGDAL: support finding additional GDAL library names 1b2774450d FindGDAL: add support for skipping gdal-config 1621cb3eb1 FindGDAL: add documentation to cache variables 3caaff4c08 FindGDAL: conditionally set the output variables 3f6a4f2062 FindGDAL: mark cache variables as advanced 02e906305d FindGDAL: use execute_process instead of exec_program 140344da14 FindGDAL: fix some indentation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5799
| * | | FindGDAL: support finding additional GDAL library namesBen Boeckel2021-02-121-1/+17
| | | |
| * | | FindGDAL: add support for skipping gdal-configBen Boeckel2021-02-111-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | This can be confusing if there are autotools and CMake-built GDAL builds within the same environment as the autotools variant will always be preferred.
| * | | FindGDAL: add documentation to cache variablesBen Boeckel2021-02-111-0/+3
| | | |
| * | | FindGDAL: conditionally set the output variablesBen Boeckel2021-02-111-8/+10
| | | |
| * | | FindGDAL: mark cache variables as advancedBen Boeckel2021-02-111-0/+3
| | | |