summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'find_openacc_targets'Brad King2019-08-201-3/+29
|\ | | | | | | | | | | | | | | f4fc0667ae FindOpenACC: Provide import targets and OpenACC_<lang>_OPTIONS variable 9460501ad7 FindOpenACC: Provide a Fortran snippet that compiles with gfortran Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3670
| * FindOpenACC: Provide import targets and OpenACC_<lang>_OPTIONS variableRobert Maynard2019-08-191-0/+28
| | | | | | | | | | | | Previously the FindOpenACC module had issues where the contents of OpenACC_<lang>_FLAGS could not be used with target_compile_options when it contained multiple compiler flags.
| * FindOpenACC: Provide a Fortran snippet that compiles with gfortranRobert Maynard2019-08-091-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | The original Fortran snippet would fail to compile with the error message of: ``` return 0; 1 Error: Alternate RETURN statement at (1) is only allowed within a SUBROUTINE ``` We solve this by removing the early termination logic.
* | Merge topic 'swift-mode-flags'Brad King2019-08-191-0/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | 4d83e47c05 Swift: define `CMAKE_Swift_FLAGS` correctly Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !3684
| * | Swift: define `CMAKE_Swift_FLAGS` correctlySaleem Abdulrasool2019-08-121-0/+2
| | | | | | | | | | | | | | | Invoke `cmake_initialize_per_config_variable` to ensure that build type flags are properly initialised.
* | | Merge topic 'solaris_clang'Brad King2019-08-192-0/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 47937219ee Solaris: Add support for Clang compiler Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3672
| * | | Solaris: Add support for Clang compilerLibor Bukata2019-08-092-0/+2
| | |/ | |/| | | | | | | | | | Inspired-by: Rainer Orth Fixes: #19456
* | | Merge topic 'msvc-runtime-library-flang'Brad King2019-08-191-0/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | ea0294c281 Flang: Implement MSVC runtime library abstraction Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3674
| * | | Flang: Implement MSVC runtime library abstractionBrad King2019-08-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit fb3370b6a1 (MSVC: Add abstraction for runtime library selection, 2019-04-10, v3.15.0-rc1~229^2) we overlooked updating flags for Flang on Windows. Add them now and update the MSVCRuntimeLibrary Fortran test to work with Flang. Base the flags on those we already use for the GNU-like Clang targeting the MSVC ABI. Fixes: #19583
| * | | Merge branch 'FindGLEW-macOS' into release-3.15Brad King2019-08-061-3/+34
| |\ \ \ | | | | | | | | | | | | | | | Merge-request: !3656
* | \ \ \ Merge topic 'swift-import-library-location'Kyle Edwards2019-08-191-2/+6
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5480f65ab1 Swift: honour `IMPLIB_LOCATION` property Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !3686
| * | | | | Swift: honour `IMPLIB_LOCATION` propertySaleem Abdulrasool2019-08-121-2/+6
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rules did not account for the import library location (through `<TARGET_IMPLB>`) and instead would always write the import library to the default location (next to the shared library/executable). This prevented the use of `CMAKE_RUNTIME_OUTPUT_LOCATION` and `CMAKE_ARCHIVE_OUTPUT_LOCATION`.
* | | | | Merge topic 'clang-llvm-rc'Kyle Edwards2019-08-161-0/+15
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cea253a38b Clang: Fall back to llvm-rc when rc is unavailable Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !3687
| * | | | | Clang: Fall back to llvm-rc when rc is unavailableGregory Mitrano2019-08-141-0/+15
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change modifies how CMAKE_RC_COMPILER is configured to improve the out-of-box experience for developers using Clang on Windows. The previous behavior was to require the user to explicitly specify the resource compiler when CMake was called. The new behavior is to automatically attempt to locate the MSVC rc binary and use that if it's found. If rc is not available, CMake will now fall back to Clang's llvm-rc binary. With this change in place, trivial C/C++ programs can be generated with Ninja and Clang on Windows without running into errors about a missing resource compiler. Fixes: #19318
* | | | | Merge topic 'per-language-link-library-flag'Kyle Edwards2019-08-131-0/+1
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 689be6235e Generator: support per-language link library flag Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3668
| * | | | | Generator: support per-language link library flagSaleem Abdulrasool2019-08-091-0/+1
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables the use of MSVC and Swift on Windows in a single project. MSVC uses no flag to indicate linked libraries while Swift uses `-l`. Add support for a language specific link library flag which takes precedence over the global `CMAKE_LINK_LIBRARY_FLAG` which preserves compatibility with earlier releases.
* | | | | Merge topic 'cuda_separable_compilation_determined_by_compiler_id'Kyle Edwards2019-08-132-1/+3
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | a233e4e7d9 CUDA: Compilers can now state they don't require a device linking step Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3659
| * | | | CUDA: Compilers can now state they don't require a device linking stepRobert Maynard2019-08-062-1/+3
| | | | |
* | | | | Merge topic 'soname-darwin'Brad King2019-08-091-1/+3
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2171f6ec0e Swift: correct SONAME flag for Darwin targets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3640
| * | | | | Swift: correct SONAME flag for Darwin targetsSaleem Abdulrasool2019-08-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Adjust the build rules for Swift to fix the SONAME handling for Darwin.
* | | | | | Merge topic 'fphsa-components-space'Brad King2019-08-091-2/+2
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e45187d525 FPHSA: Remove extra space in module components report Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Alex Turbov <i.zaufi@gmail.com> Merge-request: !3655
| * | | | | FPHSA: Remove extra space in module components reportSylvain Joubert2019-08-061-2/+2
| |/ / / /
* | | | | Merge topic 'FindPython-virtual-env'Brad King2019-08-074-185/+312
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7ed84b1e8f FindPython: ensure virtual environments are correctly handled Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3649
| * | | | | FindPython: ensure virtual environments are correctly handledMarc Chevrier2019-08-054-185/+312
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: #19525
* | | | | | 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