summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'add_lang_agnostic_check_compile_flag_module'Brad King2020-09-296-117/+122
|\ | | | | | | | | | | | | 90dead024c CheckCompilerFlag: unified way to check compiler flags per language Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5281
| * CheckCompilerFlag: unified way to check compiler flags per languageRobert Maynard2020-09-286-117/+122
| |
* | Merge topic 'vs-generator-platform-install-prefix'Brad King2020-09-281-0/+4
|\ \ | | | | | | | | | | | | | | | | | | 561d4b4a47 VS: Fix CMAKE_INSTALL_PREFIX with GENERATOR_PLATFORM for x64 and ARM Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5272
| * | VS: Fix CMAKE_INSTALL_PREFIX with GENERATOR_PLATFORM for x64 and ARMRechi2020-09-251-0/+4
| |/ | | | | | | | | | | | | | | Generate the same default `CMAKE_INSTALL_PREFIX` if a project is configured with CMAKE_GENERATOR_PLATFORM (`cmake -G "Visual Studio [...]" -A x64` and `cmake -G "Visual Studio [...]" -A ARM`) instead of the prior CMake 3.1 way (`cmake -G "Visual Studio [...] Win64"` and `cmake -G "Visual Studio [...] ARM"`).
* | Merge topic 'pkg_config_detailed_error'Brad King2020-09-281-2/+10
|\ \ | | | | | | | | | | | | | | | | | | | | | ab8bd48352 FindPkgConfig: Search for pkg-config.bat file on a Windows host 3201dd521e FindPkgConfig: Show more info when pkg-config --version fails Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5273
| * | FindPkgConfig: Search for pkg-config.bat file on a Windows hostAlexandru Croitor2020-09-251-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The strawberry perl distribution ships a pkg-config file and a pkg-config.bat file. find_program() does not usually look for a .bat file program unless explicitly specified in the NAMES argument. This would cause CMake to find the non-bat file, and executing that with execute_process() leads to a '%1 is not a valid Win32 application' error. Prefer to search for pkg-config.bat file when on a Windows host, in additiona to the regular pkg-config file. Fixes: #21239
| * | FindPkgConfig: Show more info when pkg-config --version failsAlexandru Croitor2020-09-251-1/+3
| |/ | | | | | | Fixes: #21239
* | Merge topic 'FPHSA-fix-spurious-error'Brad King2020-09-281-1/+1
|\ \ | | | | | | | | | | | | | | | | | | 1e82b1c4bc FPHSA: avoid spurious error if version variable is not defined Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5277
| * | FPHSA: avoid spurious error if version variable is not definedMarc Chevrier2020-09-251-1/+1
| | | | | | | | | | | | Fixes: #21241
* | | Merge topic 'FindJNI-aarch64'Brad King2020-09-281-1/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | 696d16ae6c FindJNI: Add aarch64 support Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Vitaly Lipatov <lav@etersoft.ru> Merge-request: !5275
| * | FindJNI: Add aarch64 supportBrad King2020-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | Extend the fix from commit 44dffbcc94 (FindJNI: Add arm64 support, 2020-08-25, v3.18.3~21^2) to cover the `aarch64` name too. Fixes: #21237
* | | Merge topic 'cuda_clang_separable'Brad King2020-09-255-3/+25
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | c63fe01835 CUDA: Clang separable compilation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5221
| * | | CUDA: Clang separable compilationRaul Tambre2020-09-245-3/+25
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For NVCC the compiler takes care of device linking when passed the "-dlink" flag. Clang doesn't support such magic and requires the buildsystem to do the work that NVCC does behind the scenes. The implementation is based on Bazel's device linking documentation: https://github.com/tensorflow/tensorflow/blob/7cabcdf073abad8c46e9dda62bb8fa4682d2061e/third_party/nccl/build_defs.bzl.tpl#L259 Closes: #20726
* | | Merge topic 'clang-llvm-lib'Brad King2020-09-251-1/+2
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | f5d3da091b Clang: Look for llvm-lib when using MSVC-like front-end Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Thomas Bernard <thomas@famillebernardgouriou.fr> Merge-request: !5264
| * | Clang: Look for llvm-lib when using MSVC-like front-endShoaib Meenai2020-09-241-1/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 55196a1440 (MSVC: Use 'lib' instead of 'link /lib' to create static libraries, 2020-01-10, v3.18.0-rc1~625^2) we changed CMake to use lib instead of `link /lib` to create static libraries, but it didn't search for `llvm-lib`. If you have `llvm-lib` but not `lib` (e.g. when cross-compiling), when `CMakeFindBinutils` is invoked for the `C` and `CXX` languages, `CMAKE_AR` is not found. When it's subsequently invoked for the ASM language, `CMAKE_ASM_SIMULATE_ID` and `CMAKE_ASM_COMPILER_FRONTEND_VARIANT` are not set (because `CMakeDetermineASMCompiler` doesn't call `CMAKE_DETERMINE_COMPILER_ID`, which sets those variables), so we go down the non-MSVC conditional and set `CMAKE_AR` to a GNU-style `ar`, which of course does not understand lib flags. Explicitly search for `llvm-lib` to avoid this situation.
* | Merge topic 'check-source-modules'Brad King2020-09-2413-763/+416
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 357e2ef429 CheckSoureRuns: Add a unified way to check if a source runs 10ae907de0 CheckSoureCompiles: Add a unified way to check if a source compiles f5c928f73c Add a test to verify '\' handling in CHECK_CXX_SOURCE_COMPILES Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Michael Hirsch, Ph.D. <michael@scivision.dev> Merge-request: !5223
| * | CheckSoureRuns: Add a unified way to check if a source runsRobert Maynard2020-09-236-387/+212
| | |
| * | CheckSoureCompiles: Add a unified way to check if a source compilesRobert Maynard2020-09-237-376/+204
| | |
* | | Merge topic 'FindPython-fix-regex'Brad King2020-09-241-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 6c094c1c1e FindPython: Fix erroneous regex in ABI check Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5257
| * | | FindPython: Fix erroneous regex in ABI checkMarc Chevrier2020-09-231-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | | | | A regex added by commit 6fdfe2428d (FindPython: enhance ABI checks against include directory, 2020-09-02, v3.18.3~17^2) was missing a backslash. Fixes: #21223
* | | Merge topic 'find_package-version-range'Craig Scott2020-09-246-63/+226
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5b3356263c CMakePackageConfigHelpers: Add version range support 6bfc442fde FPHSA: add support of version range d7df81067b find_package: Add support of version range 09095dbcd2 cmFindPackageCommand: Refactoring Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Michael Hirsch, Ph.D. <michael@scivision.dev> Merge-request: !5226
| * | | CMakePackageConfigHelpers: Add version range supportMarc Chevrier2020-09-235-5/+42
| | | |
| * | | FPHSA: add support of version rangeMarc Chevier2020-09-231-58/+184
| | | |
* | | | Merge topic 'intel-dpcpp'Brad King2020-09-232-0/+8
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | 887f3a88a6 Intel: Add Intel DPC++ compiler identification Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5255
| * | | Intel: Add Intel DPC++ compiler identificationHarini Chilamantula2020-09-222-0/+8
| |/ / | | | | | | | | | | | | The compiler identifies itself with the `__INTEL_DPCPP_COMPILER__` preprocessor definition.
* | | FindProtobuf: Link to threads dependency only when Protobuf is foundBrad King2020-09-221-1/+1
|/ / | | | | | | | | | | | | | | | | Since commit 03454b0d0d (FindProtobuf: Add missing link dependencies on threads, 2018-10-31, v3.13.0-rc3~10^2) we add the threads library to the list of libraries needed for Protobuf. Update the logic to do this only when a real protobuf library is actually found. Fixes: #21161
* | Merge topic 'comp-ti-std-options'Brad King2020-09-223-12/+141
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6a66bb13ed Compiler/TI: Add std options for C++14 fe9cddf181 Compiler/TI: Add std options for C++98 55fc045aa8 Compiler/TI: Add std options for C11 2e69993101 Compiler/TI: Check default C standard 8300030f71 Compiler/TI: Check compiler version for C99 support 0b4582f229 Compiler/TI: Fix definition of std options a70df0d6f0 Compiler/TI: Avoid generic variable name in macro Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5249
| * | Compiler/TI: Add std options for C++14Josef Angstenberger2020-09-201-4/+22
| | | | | | | | | | | | | | | The TI compiler does either support C++98 or C++14, but not both at the same time.
| * | Compiler/TI: Add std options for C++98Josef Angstenberger2020-09-201-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | The TI compiler does not support C++98, only C++03 (based on manual of current version). This change sets the C++98 option to C++03 based on the fact that it is done this way for the SunPro compiler already.
| * | Compiler/TI: Add std options for C11Josef Angstenberger2020-09-201-0/+11
| | |
| * | Compiler/TI: Check default C standardJosef Angstenberger2020-09-202-0/+19
| | |
| * | Compiler/TI: Check compiler version for C99 supportJosef Angstenberger2020-09-201-4/+35
| | |
| * | Compiler/TI: Fix definition of std optionsJosef Angstenberger2020-09-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | - The compile option variable has to be defined as list. - The compiler works in relaxed ANSI mode by default. Strict ANSI has to be explicitly set additionally to the language standard.
| * | Compiler/TI: Avoid generic variable name in macroJosef Angstenberger2020-09-201-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit a548a52230 (Compiler/TI: Refactor C/CXX to use a common file, 2020-07-11) a variable named `prefix` has been introduced. It is set in the callers namespace because it was defined inside a macro, not a function. Avoid such generic variable name.
* | | Merge topic 'findthreads_missing_prototype'Brad King2020-09-221-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6ef64013ba FindThreads: Add missing static keyword in pthread test code Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Rolf Eike Beer <eike@sf-mail.de> Merge-request: !5241
| * | | FindThreads: Add missing static keyword in pthread test codePavel Otchertsov2020-09-181-1/+1
| |/ / | | | | | | | | | | | | | | | | | | When CMAKE_C_FLAGS contains '-Werror -Wmissing-prototypes' the pthread test code check fails with error: "src.c:3:7: error: no previous prototype for 'test_func' [-Werror=missing-prototypes]". Adding 'static' keyword to 'test_func' fixes it.
* | | Merge topic 'FindGLEW-platform'Brad King2020-09-221-2/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | d628ac0eb8 FindGLEW: Avoid using CMAKE_GENERATOR_PLATFORM to detect platform Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5244
| * | | FindGLEW: Avoid using CMAKE_GENERATOR_PLATFORM to detect platformAsit Dhal2020-09-211-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Use `CMAKE_SIZEOF_VOID_P` instead. Fixes: #21128
* | | | Merge topic 'findcudatoolkit_cross_scattered'Brad King2020-09-221-4/+5
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9d3f7872e1 FindCUDAToolkit: Support scattered installations when crosscompiling Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5247
| * | | | FindCUDAToolkit: Support scattered installations when crosscompilingRaul Tambre2020-09-201-4/+5
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously when CMAKE_CROSSCOMPILING was ON we'd end up not setting the target directory if the non-scattered one didn't exist. Fix this by assuming a scattered installation if the target directory isn't set after the crosscompiling logic. This is the same fix as commit 2c0d5d01ee (CUDA: Support scattered installations when crosscompiling with Clang, 2020-09-14).
* | | | Merge topic 'check-compiler-flag-result'Brad King2020-09-222-2/+0
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | d4390c13e9 Merge branch 'backport-3.17-check-compiler-flag-result' d46590910c Check*CompilerFlag: Do not set result as a normal variable too Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Alexander Grund <github@grundis.de> Merge-request: !5250
| * | | Merge branch 'backport-3.17-check-compiler-flag-result'Brad King2020-09-212-2/+0
| |\ \ \
| | * | | Check*CompilerFlag: Do not set result as a normal variable tooBrad King2020-09-212-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring in commit cb984c6627 (Check*CompilerFlag: Modernize modules, 2019-12-09, v3.17.0-rc1~320^2) accidentally left the result set as a normal variable in addition to as a cache entry. This is not specified by the documentation, and is not the behavior in CMake 3.16 and below. Fixes: #21207
* | | | | Merge topic 'xcode-12-new-build-system'Brad King2020-09-212-0/+13
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b8ecd4df5f ExternalProject: Use CMP0114 NEW behavior with Xcode "new build system" fe258f6382 Tests: Skip RunCMake.XcodeProject device cases for Xcode "new build system" 1c3d2d0951 Tests: Skip Qt*Autogen.MocSkipSource case for Xcode "new build system" 542884e527 Tests: Update RunCMake.XcodeProject cases for Xcode "new build system" 832a78be2d Tests: Update BuildDepends test for Xcode "new build system" ff76c51ec3 Tests: Update RunCMake.file case with workaround for Xcode "new build system" 1806cdd17c Tests: Avoid duplicate custom commands for Xcode "new build system" 8d5f4c4db9 Xcode: Switch to the "new build system" for Xcode 12 and above ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5229
| * | | | ExternalProject: Use CMP0114 NEW behavior with Xcode "new build system"Brad King2020-09-182-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ExternalProject module cannot be implemented in the Xcode "new build system" without using CMP0114's NEW behavior. When configuring for that build system, warn if the policy is not set to NEW and use NEW behavior anyway.
* | | | | Merge topic 'FindMatlab-r2020b'Brad King2020-09-181-0/+1
|\ \ \ \ \ | | |/ / / | |/| | / | |_|_|/ |/| | | | | | | | | | | 4d292aecb6 FindMatlab: add R2020b => 9.9 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5233
| * | | FindMatlab: add R2020b => 9.9Michael Hirsch2020-09-171-0/+1
| | | |
* | | | Merge topic 'finddoxygen-permission-denied'Brad King2020-09-171-7/+11
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 818c6948da FindDoxygen: build the generated file contents using temporary strings Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5230
| * | | | FindDoxygen: build the generated file contents using temporary stringsRonald Hiemstra2020-09-161-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Incrementally writing to a file, could result in write (permission denied) errors. Those errors are probably due to file-monitoring processes having a temporary lock on a generated file. The implemented solution builds the content of the generated file as string and in the end the built string is written to the generated file. Fixes: #21190
* | | | | Merge topic 'findlibxml2_add_names'Brad King2020-09-171-1/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fa258f175d FindLibXml2 : added libxml2_a to find_library() Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5232