summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'FindThreads-revert-libc-check' into release-3.14Brad King2019-02-271-11/+3
|\ | | | | | | Merge-request: !3022
| * FindThreads: Revert libc symbol check to pthread_createBrad King2019-02-271-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Since commit e9a1ddc594 (FindThreads: Replace the pthread symbol checking in libc., 2018-11-18, v3.14.0-rc1~292^2) we check libc for `pthread_kill` instead of `pthread_create`. However, on FreeBSD `pthread_kill` is in libc but not `pthread_create`. Discussion in the original merge request for the above commit also considered `pthread_key_create`, `pthread_self`, and `pthread_attr_init`. Every symbol seems to have some reason it is not an appropriate choice. Revert to the pre-3.14 behavior of using `pthread_create` pending further investigation.
| * FindThreads: Fix libc check to use proper header for pthread_killBrad King2019-02-261-2/+4
| | | | | | | | | | | | | | | | | | | | | | In commit e9a1ddc594 (FindThreads: Replace the pthread symbol checking in libc., 2018-11-18, v3.14.0-rc1~292^2) we switched to checking for `pthread_kill` in libc but did not update the symbol check's header file to match. Add `signal.h` to get `pthread_kill`. Keep `pthread.h` anyway since the purpose of the check is to verify that the pthread API works. Fixes: #18984
* | Merge branch 'FindOctave-remove' into release-3.14Brad King2019-02-271-179/+0
|\ \ | | | | | | | | | Merge-request: !3027
| * | FindOctave: Remove module pending further workBrad King2019-02-261-179/+0
| |/ | | | | | | | | | | | | | | | | | | | | The `FindOctave` module added by commit 170bcb6fdc (FindOctave: Add module to find GNU octave, 2018-11-17, v3.14.0-rc1~283^2) has a few problems in its implementation that need to be worked out before the module can be included in a CMake release. These were missed during review. Remove the module for now. It can be restored later with a fresh review. Issue: #18991
* | Merge branch 'vs-llvm-extension' into release-3.14Brad King2019-02-271-2/+9
|\ \ | | | | | | | | | Merge-request: !3024
| * | VS: Fix detection of clang-cl with -T llvmBrad King2019-02-261-2/+9
| |/ | | | | | | | | | | | | | | | | | | | | When using a VS generator with `-T llvm`, MSBuild relies on the "LLVM Compiler Toolchain" VS Extension. This does not put `clang-cl` in the `PATH` inside the build, and LLVM no longer provides a `cl` replacement either. Therefore we need another way to extract the path to the `CMAKE_{C,CXX}_COMPILER`. Fortunately the LLVM VS integration provides a `$(ClangClExecutable)` macro we can reference to get the path. Fixes: #18983
* | Merge branch 'qcc-asm-detection' into release-3.14Brad King2019-02-252-0/+6
|\ \ | | | | | | | | | Merge-request: !3016
| * | Add ASM Compiler detection for QCCMaikel van den Hurk2019-02-252-0/+6
| | |
* | | Merge branch 'check_lang_source_runs_output' into release-3.14Brad King2019-02-252-2/+12
|\ \ \ | | | | | | | | | | | | Merge-request: !3011
| * | | CheckLangSourceRuns: Capture run output to log filesCraig Scott2019-02-232-2/+12
| | |/ | |/| | | | Fixes: #18973
* | | Merge branch 'asm-no-slash-question' into release-3.14Brad King2019-02-193-3/+3
|\ \ \ | | | | | | | | | | | | Merge-request: !2984
| * | | Use -? instead of /? to test compiler for MSVC-like command-line supportBrad King2019-02-193-3/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | MS-style command-line tools accept either `/` or `-` for command-line options. Prefer `-` over `/` so that non-MS tools do not treat it as a path. Fixes: #18941
* | | Merge branch 'fix-legacy-implicit-includes' into release-3.14Brad King2019-02-192-3/+17
|\ \ \ | | | | | | | | | | | | Merge-request: !2981
| * | | Do not explicitly report "standard" include directories as implicitBrad King2019-02-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 1293ed8507 (ParseImplicitIncludeInfo: keep implicit incl. consistent when rerunning cmake, 2019-01-30, v3.14.0-rc1~26^2) we did not account for `CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES`. This variable lets platform modules or toolchain files specify directories that are to be explicitly passed as standard include directories. These include directories are used by the test project from which we extract implicit include directories so they appear in the parsed results whether or not the compiler really considers them implicit. Exclude these entries from the computed implicit include directories since they are not actually implied by the compiler when we invoke it with "standard" include directories passed explicitly. Instead teach the build system generators to treat the "standard" directories as implicit for purposes of excluding them from appearing earlier in the compiler command line due to `include_directories` and `target_include_directories` calls. Issue: #18936, #18944
| * | | Prefix implicit include directories with sysroot on constructionBrad King2019-02-181-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 7cd65c97fa (Add CMAKE_SYSROOT variable to set --sysroot when cross compiling., 2013-04-13, v3.0.0-rc1~342^2) we have prefixed the value of `CMAKE_SYSROOT` to implicit include directories. This was done because we hard-coded `/usr/include` as an implicit include directory without accounting for the sysroot. Instead we should prefix the hard-coded paths when they are constructed. Update the `Platform/UnixPaths` module to do this as `Platform/Darwin` already does. Since commit 5990ecb741 (Compute implicit include directories from compiler output, 2018-12-07, v3.14.0-rc1~108^2) the values of the `CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES` variables are computed from a real compiler invocation so they already account for the sysroot prefix. In commit 6fc3382944 (Update logic for sysroot in detected implicit include directories, 2019-02-13, v3.14.0-rc2~6^2) we attempted to apply the prefix conditionally, but that is incorrect because the compiler's real implicit include directories are not all under the sysroot. Instead assume that all implicit include directories in `CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES` already have the sysroot prefix if needed. Code that constructs the value must be responsible for that because it is the only place that knows.
* | | | Merge branch 'FindBoost-layout-tagged' into release-3.14Brad King2019-02-191-0/+8
|\ \ \ \ | | | | | | | | | | | | | | | Merge-request: !2961
| * | | | FindBoost: Find boost libraries built with --layout=taggedYves Frederix2019-02-181-0/+8
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | Pick up libraries of the form `boost_system-mt-x64`, which do not have the version suffix. Fixes: #18908
* | | | Help: Clarify ExternalProject_Add()'s LOG_MERGED_STDOUTERR behaviorCraig Scott2019-02-171-1/+2
|/ / / | | | | | | | | | | | | | | | The output is only merged for a step if it is logging to file. This option is ignored for steps that are logging normally. A minor grammatical error has also been fixed as part of this change.
* | | Merge branch 'try_compile-expand-compile-defs' into release-3.14Brad King2019-02-152-12/+12
|\ \ \ | | | | | | | | | | | | Merge-request: !2965
| * | | try_compile: Restore expansion of ;-list in COMPILE_DEFINITIONSBrad King2019-02-152-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The quoting added by commit 8c5221fb1f (try_compile: Preserve special characters in COMPILE_DEFINITIONS, 2019-01-21, v3.14.0-rc1~108^2~3) broke the case that the `COMPILE_DEFINITIONS` value contains a `;`. Without the quoting the `;` would be generated literally in an unquoted argument in the test `CMakeLists.txt` file and would then be expanded. With quoting the `;` is preserved, which is not the old behavior. Fix this by expanding the `;`-list ahead of time. Add test cases for behavior with both `#` and `;`. This was noticed with the PGI compiler where we set `CMAKE_CXX*_STANDARD_COMPILE_OPTION` to values like `--c++17;-A`. The symptom had also been observed while preparing commit ef8f237686 (ParseImplicitIncludeInfo: add SunPro Fortran and PGI compiler, Cray fix, 2019-01-29, v3.14.0-rc1~26^2~2) but was not recognized at the time as a regression. Revert the workaround added by that commit. Fixes: #18919
* | | | Merge branch 'FindLibXml2' into release-3.14Brad King2019-02-151-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | Merge-request: !2970
| * | | | FindLibXml2: Document LibXml2_FOUND as preferred caseSaleem Abdulrasool2019-02-151-1/+1
| |/ / / | | | | | | | | | | | | | | | | Both `LIBXML2_FOUND` and `LibXml2_FOUND` are provided but the modern convention is to use the case that matches the module name.
* | | | Merge branch 'fortran-submodule-names' into release-3.14Brad King2019-02-145-0/+15
|\ \ \ \ | | | | | | | | | | | | | | | Merge-request: !2958
| * | | | Fortran: Fix submodule file names across compilersBrad King2019-02-145-0/+15
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The naming convention for submodule files varies across compilers. Add a table to the compiler information modules and thread the information through to the Fortran module dependency parser. Fill out the table for compiler ids known to support Fortran submodules. Fixes: #18746
* | | | Merge branch 'fix-legacy-implicit-includes' into release-3.14Brad King2019-02-132-6/+1
|\ \ \ \ | | |/ / | |/| | | | | | Merge-request: !2957
| * | | Fix regression in -I/usr/include exclusion logicBrad King2019-02-131-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change in commit 15ad830062 (Refactor exclusion of -I/usr/include to avoid per-language values, 2019-01-21, v3.14.0-rc1~108^2~4) caused the exclusion to apply to Fortran, but it was only meant for C, CXX, and CUDA. The purpose of the change was to prepare for the value of `CMAKE_<LANG>_IMPLICIT_INCLUDE_DIRECTORIES` to be computed from the actual compiler instead of hard-coded. We need to preserve exclusion of `-I/usr/include` if the compiler has any implicit include directory that looks intended to replace it, e.g. `<sdk>/usr/include` on macOS. Fixes: #18914
| * | | macOS: Fix addition of <sdk>/usr/include to default implicit include dirsBrad King2019-02-131-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 1293ed8507 (ParseImplicitIncludeInfo: keep implicit incl. consistent when rerunning cmake, 2019-01-30, v3.14.0-rc1~26^2) the `Platform/UnixPaths` module was updated to add `/usr/include` to `CMAKE_{C,CXX,CUDA}_IMPLICIT_INCLUDE_DIRECTORIES` through an initialization variable used by `CMakeDetermineCompilerABI` instead of directly. This approach makes it only a default that can be overridden by detection of the implicit include directories really used by the compiler. The addition of `<sdk>/usr/include` to default implicit include directories by the `Platform/Darwin` module needs the same update but was accidentally left out of the original commit.
* | | Merge branch 'FindMatlab-version-empty' into release-3.14Brad King2019-02-111-2/+2
|\ \ \ | | | | | | | | | | | | Merge-request: !2949
| * | | FindMatlab: Tolerate empty version log fileSebastian Nagel2019-02-111-2/+2
| |/ /
* | | FindOctave: Add target for octinterpPeter Stroia-Williams2019-02-081-1/+13
| | | | | | | | | | | | | | | | | | This change adds the Octave::Octinterp target to make the octinterp library available without users having to resort to using the Octave_INTERP_LIBRARY variable.
* | | Merge branch 'cpack-ifw-error-wording' into release-3.14v3.14.0-rc1Brad King2019-02-071-1/+1
|\ \ \ | | | | | | | | | | | | Merge-request: !2928
| * | | CPack/IFW: Correct wording in error messageJoachim Wuttke (o)2019-02-071-1/+1
| |/ /
* | | Merge branch 'FindHDF5-cleanup' into release-3.14Brad King2019-02-071-59/+81
|\ \ \ | | | | | | | | | | | | Merge-request: !2916
| * | | FindHDF5: Modernize formatting of variable documentationMichael Hirsch, Ph.D2019-02-071-49/+69
| | | |
| * | | FindHDF5: Use execute_process instead of exec_programMichael Hirsch, Ph.D2019-02-071-10/+12
| |/ /
* | | Xcode: Derive stdlib from CXX flagsGregor Jasny2019-02-072-0/+10
|/ / | | | | | | Closes: #18396
* | Merge topic '17870-iphone-friendly-cmake'Brad King2019-02-0517-17/+66
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | e8ee8cab97 Xcode: Completely disable code signing for compiler id detection 11da882a12 Apple: Introduce separate system name for iOS, tvOS, and watchOS 36cf44a7a3 Tests: Isolate RunCMake.XcodeProject per-device cases from host arch Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2392
| * | Xcode: Completely disable code signing for compiler id detectionGregor Jasny2019-02-042-14/+1
| | | | | | | | | | | | Issue: #17870
| * | Apple: Introduce separate system name for iOS, tvOS, and watchOSGregor Jasny2019-02-0416-4/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove code signing requirements for non-macOS - Do not set deployment target for non-macOS - Build static library for compiler feature detection for non-macOS - Use framework to run CompilerId tests for watchOS - Port tests to new SDK handling - Add new Apple cross-compiling section to toolchain documentation Closes: #17870
* | | Xcode: Update default Swift language version for Xcode 10.2Brad King2019-02-041-0/+2
| | | | | | | | | | | | | | | | | | Xcode 10.2 no longer supports Swift language versions before 4.0. Fixes: #18871
* | | Merge topic 'implicit-incs-cleanup'Brad King2019-02-0121-178/+77
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1293ed8507 ParseImplicitIncludeInfo: keep implicit incl. consistent when rerunning cmake eaf53158f4 CrayPrgEnv/ParseImplicitIncludes: simplify for new implict include parser ef8f237686 ParseImplicitIncludeInfo: add SunPro Fortran and PGI compiler, Cray fix Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2894
| * | | ParseImplicitIncludeInfo: keep implicit incl. consistent when rerunning cmakeChuck Cranor2019-01-302-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first time you run cmake, it sets the implicit include path to the value reported by the parser (and this value gets saved in CMake${lang}Compiler.cmake). But if you re-run cmake, UnixPaths.cmake blindly appends an extra /usr/include to the value saved in CMake${lang}Compiler.cmake. That should not be harmful in most cases, but we want later runs of cmake to be consistent with the initial one. Resolve using a solution suggested by Brad King: - UnixPaths now sets the default implicit include path in a new variable named _CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES_INIT This value is only used the first time cmake is run (by CMakeDetermineCompilerABI.cmake when it calls the implicit include parser). - if CMakeDetermineCompilerABI.cmake successfully calls the implicit include parser, it overwrites the value in _CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES_INIT with the value returned by the parser - CMakeDetermineCompilerABI.cmake always sets CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES to the above value of _CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES_INIT - the final value of CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES gets saved to CMake${lang}Compiler.cmake when it is regenerated after the compiler tests are done. - CMakeDetermineCompilerABI.cmake is only executed the first time cmake is run. Additional runs of cmake directly load the implicit include path from the value saved in CMake${lang}Compiler.cmake (the parser and _INIT variable are not used). The above depends on UnixPaths.cmake being loaded to set the _INIT value before CMakeDetermineCompilerABI.cmake runs the implicit include parser.
| * | | CrayPrgEnv/ParseImplicitIncludes: simplify for new implict include parserChuck Cranor2019-01-2916-155/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove now redundant implicit parser code from CrayPrgEnv.cmake, as this function is now supported in the general cmake code (e.g. Modules/CMakeParseImplicit{Include,Link}Info.cmake). This simplifies __CrayPrgEnv_setup() to take only one arg (${lang}) and allows us to remove a level of inclusion as CrayPrgEnv-${lang}.cmake is now compiler independent we do not need the CrayPrgEnv-${compiler}-${lang} files any more.
| * | | ParseImplicitIncludeInfo: add SunPro Fortran and PGI compiler, Cray fixChuck Cranor2019-01-293-16/+61
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add implicit include parser for PGI compiler ID. PGI verbose output for CXX differs from C and Fortran, so CXX is broken out into its own case. The C and Fortran compilers take "-YI,path" and "-Mnostdinc" to change or disable the builtin include path. The last arg on the command line appears to override previous args (e.g. "-YI,path1 -YI,path2" will set the path to "path2" ... the previous "-YI,path1" gets undone). The CXX compiler verbose output reports with "-I" rather than "-stdinc" for the built in path. In addition with CXX "-Mnostdinc" does not completely zero the include path (e.g. "#include <stdio.h>" still works with "-Mnostdinc"... "-I/usr/include" still shows up in the verbose output). Minor adjustments to get the SunPro parser to handle Fortran as well. Fixes for Cray compiler support (Modules/Compiler/Cray-{C,CXX}.cmake): The *_COMPILE_OPTION flags contain options like "-h c99,gnu" ... these options need to be in double quotes (they are currently not). Otherwise, cmake treats them as lists and tries to run the compiler with "-h;c99,gnu" and fails when it is "Detecting C compile features"... Also, the Cray-CXX.cmake contains "__compiler_cray(C)" instead of "__compiler_cray(CXX)" -- this error prevents the correct VERBOSE flags for CXX from being defined which prevents the implicit include parser from running. Add additional test cases for PGI and SunPro Fortran to the Tests/RunCMake/ParseImplicitIncludeInfo area.
* | | Merge topic 'ninja-intel-depfile'Brad King2019-01-312-0/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a624a3e1b3 Ninja: Use deps=gcc for Intel Compiler on Windows f4f3b6b9af Ninja: Detect when ninja is new enough to support a multi-line depfile 699cd03212 Ninja: Drop unnecessary deptype customization infrastructure Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2893
| * | | Ninja: Use deps=gcc for Intel Compiler on WindowsBrad King2019-01-302-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ninja 1.9 supports the depfile format generated by this compiler. Use `deps = gcc` when the version of Ninja is new enough. Unfortunately the Intel Compiler for Windows does not properly escape spaces in paths written to a depfile so if there is a space in the path we must still fall back to `deps = msvc`. Fixes: #18855
* | | | Merge topic 'xerces-xalan-header-checking'Brad King2019-01-312-2/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c68465f790 FindXercesC, FindXalanC: Don't examine non-existent version headers Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2884
| * | | | FindXercesC, FindXalanC: Don't examine non-existent version headersRoger Leigh2019-01-302-2/+2
| |/ / /
* | | | Merge topic 'lapack-docs'Brad King2019-01-312-82/+123
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | be7b30f67e Find{BLAS,LAPACK}: Add note and example for using Intel MKL b323407235 Find{BLAS,LAPACK}: Update docs to use modern conventions ba30b94435 FindLAPACK: Remove extra indentation from a line Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2880