summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'FindGLEW-macOS'Brad King2019-08-071-3/+34
|\ | | | | | | | | | | | | | | | | feeb0381bc FindGLEW: Fix typo in verbose log message ab822a9b48 FindGLEW: Add required OpenGL dependency in macOS a8a3efa3be FindGLEW: Fix macOS library suffix selection Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3656
| * FindGLEW: Fix typo in verbose log messageClaudio Fantacci2019-08-061-1/+1
| |
| * FindGLEW: Add required OpenGL dependency in macOSClaudio Fantacci2019-08-061-0/+31
| | | | | | | | | | macOS requires OpenGL as INTERFACE_LINK_LIBRARIES dependency in the GLEW targets. This commit fixes this issue.
| * FindGLEW: Fix macOS library suffix selectionClaudio Fantacci2019-08-061-2/+2
| | | | | | | | | | | | | | | | | | | | Fix logic added by commit a7d853868b (FindGLEW: Update implementation, 2019-03-13, v3.15.0-rc1~375^2~1) on macOS. macOS is recognized as both UNIX and APPLE. Consequently, the library suffix for shared and static library was set, respectively, as `.so` and `.a`, just like UNIX systems. Fix this by properly checking the OS type. Fixes: #19542
* | Merge topic 'cmake-dependent-option-doc'Brad King2019-08-061-2/+3
|\ \ | | | | | | | | | | | | | | | | | | d192caefff CMakeDependentOption: Document that 4th parameter follows if-syntax Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3643
| * | CMakeDependentOption: Document that 4th parameter follows if-syntaxHong Xu2019-08-051-2/+3
| | |
* | | Merge topic 'clang-frontend-variant'Brad King2019-08-062-0/+32
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | a245479372 clang: Work around toolchain file use of internal CMake variables Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3650
| * | | clang: Work around toolchain file use of internal CMake variablesBrad King2019-08-052-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit d44c0db0b2 (clang: setup correct configuration in gnu mode, 2019-02-20, v3.15.0-rc1~41^2~5) our Clang compiler information modules need the `CMAKE_<LANG>_COMPILER_FRONTEND_VARIANT` variable that we compute during compiler detection. However, some existing toolchain files set our internal `CMAKE_<LANG>_COMPILER_ID_RUN` variables and block that detection, but do not set the new frontend variant variable. Help them out by setting `CMAKE_<LANG>_COMPILER_FRONTEND_VARIANT` anyway. Fixes: #19515, #19539
* | | | Make CMAKE_LINK_LIBRARY_FILE_FLAG work like CMAKE_LINK_LIBRARY_FLAGBrad King2019-08-021-1/+1
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `CMAKE_LINK_LIBRARY_FILE_FLAG` variable is meant for linkers that want library file paths to be preceded by a flag. This is used only for OpenWatcom to add the `library` argument before library file paths. Refactor the approach to treat `CMAKE_LINK_LIBRARY_FILE_FLAG` as a command-line string fragment to add just before the library file path. This has two advantages: * `CMAKE_LINK_LIBRARY_FILE_FLAG` now works like `CMAKE_LINK_LIBRARY_FLAG`. * `CMAKE_LINK_LIBRARY_FILE_FLAG` can now be an attached flag whose value is the library file path. Technically this is a change in behavior, but this setting was created for internal use and should be rarely used outside of CMake itself. Fixes: #19541
* | | Merge topic 'clang-cl-non-windows'Brad King2019-08-021-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | 863f7eb6d7 clang: Restore support for clang-cl on non-Windows hosts Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3634
| * | clang: Restore support for clang-cl on non-Windows hostsBrad King2019-07-311-1/+1
| |/ | | | | | | | | | | | | | | | | The frontend variant detection logic added by commit 53fbe23f3f (clang: introduce CMAKE_<lang>_COMPILER_FRONTEND_VARIANT, 2019-02-20, v3.15.0-rc1~41^2~8) assumes that `clang-cl` only runs on a Windows host. It is also available on non-Windows hosts. Fix the condition. Fixes: #19544
| * Merge branch 'FindMPI-link-flags' into release-3.15Brad King2019-07-251-5/+2
| |\ | | | | | | | | | Merge-request: !3605
| * \ Merge branch 'backport-clang-gnulike-support' into release-3.15Brad King2019-07-241-0/+7
| |\ \ | | | | | | | | | | | | Merge-request: !3592
| * \ \ Merge branch 'InstallRequiredSystemLibraries-redist' into release-3.15Brad King2019-07-221-6/+14
| |\ \ \ | | | | | | | | | | | | | | | Merge-request: !3585
| * \ \ \ Merge branch 'backport-swift-improvements' into release-3.15Brad King2019-07-181-4/+19
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Merge-request: !3568
| | * | | | Swift: support SONAME on ELFish targetsSaleem Abdulrasool2019-07-181-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should enable the soname to be setup for ELF shared libraries. Failure to do so generates binaries with incorrect names which prevents loading.
| | * | | | Swift: support multithreaded compilationSaleem Abdulrasool2019-07-181-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Query the number of logical CPUs available to enable parallel compilation for Swift.
| | * | | | Swift: add rules for static linkingSaleem Abdulrasool2019-07-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Swift driver recently learnt how to generate static libraries using the `-static` flag. This enables us to generate proper static libraries with dependency tracking with Swift as well.
| | * | | | Support per-language library link flagsSaleem Abdulrasool2019-07-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the behaviour of the generators to use a per-language library search path flag. This is needed for multi-language projects with different compilers (e.g. cl + gfortran). Since the adjusted variable has been part of the user settings, we control this based on a policy. Fixes: #19307
* | | | | | Merge topic 'ExternalProject-avoid-extra-checkout'Brad King2019-07-311-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 627fc5b44f ExternalProject: Avoid unnecessary checkout on clone Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3626
| * | | | | | ExternalProject: Avoid unnecessary checkout on cloneTetragramm2019-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The clone step checks out the cloned branch but is always followed by an explicit checkout of the desired `GIT_TAG`. Tell `git clone` not to check out.
* | | | | | | FindPythonInterp: Document lack of version filtering for plain `python`Brad King2019-07-301-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also drop the `CMakeOnly.MajorVersionSelection-PythonInterp_2` test because some environments now have a plain `python` executable for Python 3. Fixes: #19536
* | | | | | | Merge topic 'find_more_binutils'Brad King2019-07-301-16/+26
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 993fe2b4af CMakeFindBinUtils: add some more binutils 5412d63714 CMakeFindBinUtils: add missing llvm alternatives 3a82ef78eb CMakeFindBinUtils: Rename and unset variables for additional names Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3584
| * | | | | | CMakeFindBinUtils: add some more binutilsNorbert Lange2019-07-231-1/+7
| | | | | | |
| * | | | | | CMakeFindBinUtils: add missing llvm alternativesNorbert Lange2019-07-231-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LLVM 8.0 already ships with alternatives for all current Binutils. Enable them.
| * | | | | | CMakeFindBinUtils: Rename and unset variables for additional namesNorbert Lange2019-07-231-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use the name pattern `_CMAKE_ADDITIONAL_<PROGRAM_NAME>_NAMES`, and unset those variables at the end of the function
* | | | | | | Merge topic 'CheckCXXSymbolExists-c++-syntax'Brad King2019-07-292-2/+34
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 72fcadb007 CheckCXXSymbolExists: Make C++-syntax symbols work on more compilers Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3545
| * | | | | | | CheckCXXSymbolExists: Make C++-syntax symbols work on more compilersHong Xu2019-07-262-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some compilers the syntax `#ifndef std::fopen` will always lead to compilation error. Avoid generating it in the check.
* | | | | | | | Android: Use unified toolchain in NDK r19+Brad King2019-07-266-3/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NDK build system now uses only a single toolchain in <ndk>/toolchains/llvm/prebuilt/<host> Its compilers are always `bin/{clang,clang++}` and its binutils are always `bin/<triple>-*`. It is a standalone toolchain: * The Anrdoid API level is specified at the end of `--target=`. * The standard library may be specified via `-stdlib=`. * No need to pass system includes or libraries explicitly. * No need to pass `--sysroot` or `-gcc-toolchain`. Teach CMake to recognize NDK versions that have a unified toolchain with its own sysroot and use the above approach. Fixes: #18739
* | | | | | | | Android: Re-order system initialization to select sysroot lastBrad King2019-07-261-2/+2
| | | | | | | |
* | | | | | | | Android: Clarify name of internal variable for arch tripleBrad King2019-07-262-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The triple applies to more than just header locations.
* | | | | | | | Android: Select NDK host tag while determining systemBrad King2019-07-264-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The host tag is tied to the host platform and does not depend on any specific language or compiler.
* | | | | | | | Merge topic 'ep_support_no_submodule_init'Kyle Edwards2019-07-261-18/+50
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d6be117ca0 ExternalProject: Support not initializing any submodules Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3579
| * | | | | | | | ExternalProject: Support not initializing any submodulesRobert Maynard2019-07-241-18/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #15592
* | | | | | | | | Merge topic 'FindMPI-link-flags'Brad King2019-07-261-3/+1
|\ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cf04da7e70 FindMPI: make sure computed link flags are not de-duplicated Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: Ben Boeckel <ben.boeckel@kitware.com> Tested-by: Robert Maynard <robert.maynard@kitware.com> Acked-by: Axel Huebl <axel.huebl@plasma.ninja> Merge-request: !3605
| * | | | | | | | FindMPI: make sure computed link flags are not de-duplicatedRobert Maynard2019-07-251-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit f7eaa342de (FindMPI: Store imported target link flags as a list instead of a string, 2019-06-14, v3.15.0-rc2~2^2) we used `separate_arguments` to parse the extracted link flags and add them to `INTERFACE_LINK_LIBRARIES`. That property is not meant for link flags and CMake may de-duplicate them. This is particularly problematic for flags like `-Wl,-rpath -Wl,/path1 -Wl,-rpath -Wl,/path2`. In commit 39c572c9c9 (FindMPI: Updated to use INTERFACE_LINK_OPTIONS, 2019-06-24) we moved the parsed flags over to `INTERFACE_LINK_OPTIONS`, but that may still perform de-duplication. Avoid the parsing and de-duplication of flags by passing the original string via `SHELL:` instead. Fixes: #19516
* | | | | | | | | Merge branch 'backport-clang-gnulike-support' into clang-gnulike-supportBrad King2019-07-241-0/+7
|\ \ \ \ \ \ \ \ \ | |_|/ / / / / / / |/| | | | | | | / | | |_|_|_|_|_|/ | |/| | | | | |
| * | | | | | | Clang: For MSVC ABI do not use modes older than C++14Brad King2019-07-241-0/+7
| | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit d44c0db0b2 (clang: setup correct configuration in gnu mode, 2019-02-20, v3.15.0-rc1~41^2~5) we support the GNU-like Clang that targets the MSVC ABI. However, Clang cannot compile with the MSVC standard library unless it runs in a mode aware of C++14 (since MSVC itself does not even have a lower mode). When `CMAKE_CXX_STANDARD` is set to 98 or 11, use C++14 anyway. Since Clang's default mode is aware of C++14, another option is to not add any flags for 98 or 11. However, if a future Clang version ever defaults to a higher C++ standard, setting the standard to 98 or 11 should at least not use a mode higher than 14. Also revert test updates from commit 4819ff9647 (Tests: fix failures with gnu mode clang on windows, 2019-03-21, v3.15.0-rc1~41^2~3) that were meant to work around the standard selection problem. Fixes: #19496
* | | | | | | Merge topic 'InstallRequiredSystemLibraries-redist'Brad King2019-07-231-6/+14
|\ \ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 13c3ec545b IRSL: Fix discovery of VS 2019 v141 toolset redistributables 0484165da0 IRSL: Fix typo in v143 toolset version check Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3585
| * | | | | | IRSL: Fix discovery of VS 2019 v141 toolset redistributablesJames Butler2019-07-221-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since VS 2019, the v141 toolset redistributables can be found in either the VS 2019 or VS 2017 install directory. Update the logic to search multiple versions of VS. Fixes: #19488
| * | | | | | IRSL: Fix typo in v143 toolset version checkJames Butler2019-07-221-2/+2
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the toolset v143 check from commit 33ee779330 (IRSL: Fix discovery of VS 2019 v142 toolset redistributables, 2019-04-03, v3.14.2~6^2) to check the correct variable.
* | | | | | Merge topic 'cpack-install-scripts'Craig Scott2019-07-221-1/+15
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5f96601675 CPack: Introduce CPACK_INSTALL_SCRIPTS variable Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3531
| * | | | | CPack: Introduce CPACK_INSTALL_SCRIPTS variableAlex Turbov2019-07-211-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The singular name `CPACK_INSTALL_SCRIPT` has existed but was not linked from the CPack documentation. Also, it supported multiple values and should have had a plural name. Add a plural-named alternative now. If both `CPACK_INSTALL_SCRIPTS` and `CPACK_INSTALL_SCRIPT` are set then ignore the latter with a warning. Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
* | | | | | Merge topic 'swift-deduplicate'Brad King2019-07-191-16/+10
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 151ef7cef4 Swift: refactor rule construction to reduce duplication Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3551
| * | | | | | Swift: refactor rule construction to reduce duplicationSaleem Abdulrasool2019-07-171-16/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the placeholder expansion to avoid constructing the `-target` option by hand if specified. This reduces duplication and simplifies the rules.
* | | | | | | Merge topic 'FindProtobuf-DLLs'Brad King2019-07-191-0/+15
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3bbd85d5ff FindProtobuf: Fix usage of protobuf dynamic libraries on Windows Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3555
| * | | | | | | FindProtobuf: Fix usage of protobuf dynamic libraries on Windowsgnaggnoyil2019-07-181-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define `PROTOBUF_USE_DLLS` on Windows when linking against dynamic protobuf libraries so that we import symbols from them. We use the condition `MSVC` to enable this because that is what the upstream buildsystem uses.
* | | | | | | | Fix repeated word in FindVulkan.cmakeNeroBurner2019-07-181-1/+1
| | | | | | | |
* | | | | | | | Merge topic 'FindPython-interpreter-crosscompiling'Brad King2019-07-181-11/+10
|\ \ \ \ \ \ \ \ | | |_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 696d0f9caf FindPython: ensure interpreter is founded when cross-compiling Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3564
| * | | | | | | FindPython: ensure interpreter is founded when cross-compilingMarc Chevrier2019-07-181-11/+10
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | Fixes: #19473