summaryrefslogtreecommitdiff
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * Merge branch 'FindBISON-CMP0088-SourcePath' into release-3.15Brad King2019-07-121-3/+9
| |\ | | | | | | | | | Merge-request: !3549
| * \ Merge branch 'fortran-submodule-cray' into release-3.15Brad King2019-07-111-0/+2
| |\ \ | | | | | | | | | | | | Merge-request: !3504
| * \ \ Merge branch 'implicit-includes-cray-hlist' into release-3.15Brad King2019-07-101-2/+2
| |\ \ \ | | | | | | | | | | | | | | | Merge-request: !3532
| * \ \ \ Merge branch 'iar-riscv' into release-3.15Brad King2019-07-097-3/+20
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Merge-request: !3510
* | | | | | AIX: Do not enable runtime linking by default anymoreBrad King2019-07-172-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've long created shared objects on AIX using the linker's `-G` option (also offered by the XL front-end). The `-G` option implies `-brtl` and enables runtime linking. This has been largely unnecessary because we provide all dependencies on the link line and both XL and GNU compilers offer builtin behavior to export symbols. Since commit 0f150b69d3 (AIX: Explicitly compute shared object exports for both XL and GNU, 2019-07-11) we compute exports explicitly and consistently. Therefore runtime linking is no longer necessary for shared objects. We've also long created executables on AIX using the linker's `-brtl` option to enable runtime linking in case they load plugins at runtime. Since commit 9f5c2040bf (AIX: Explicitly compute executable exports for both XL and GNU, 2019-07-12) and commit 2fa920c0cd (AIX: Create import library for executables with exports, 2019-07-16) we now provide the linker enough information to fully resolve symbols in plugins up front. Therefore runtime linking is no longer necessary for executables. Drop use of `-G` for creating shared objects and use the XL `-qmkshrobj` and GCC `-shared` options instead. Both invoke the linker with the `-bM:SRE -bnoentry` options to create a shared object without runtime linking enabled. Also drop use of `-brtl` for creating executables. Issue: #19163
* | | | | | AIX: Create import library for executables with exportsBrad King2019-07-164-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On AIX, plugins meant to be loaded into executables via `dlopen` must be linked with access to a list of symbols exported from the executable in order to use them (when not using runtime linking). The AIX linker supports specifying this list as an "import file" passed on the command line either via the `-bI:...` option or (with a leading `#! .` line) as a normal input file like any other library file. The linker import file plays the same role on AIX as import libraries do on Windows. Teach CMake to enable its import library abstraction on AIX for executables with the `ENABLE_EXPORTS` target property set. Teach our internal `ExportImportList` script to optionally generate a leading `#! .` line at the top of the generated export/import list. Update our rule for linking an executable with exports to generate a public-facing "import library" implemented as an AIX linker import file. With this approach, our existing infrastructure for handling import libraries on Windows will now work for AIX linker import files too: * Plugins that link to their executable's symbols will be automatically linked using the import file on the command line. * The executable's import file will be (optionally) installed and exported for use in linking externally-built plugins. This will allow executables and their plugins to build even if we later turn off runtime linking. Issue: #19163
* | | | | | Merge topic 'aix-explicit-exports'Brad King2019-07-169-30/+71
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c2c3d22504 Tests: Drop RunCMake workaround for AIX ld warnings about GNU atexit 9f5c2040bf AIX: Explicitly compute executable exports for both XL and GNU 0f150b69d3 AIX: Explicitly compute shared object exports for both XL and GNU a5bf4e7921 AIX: Drop redundant -brtl flags 9cb5f040d7 XL: De-duplicate shared object creation flags Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3556
| * | | | | | AIX: Explicitly compute executable exports for both XL and GNUBrad King2019-07-152-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On AIX, symbols in executables must be exported in order to be visible to modules (plugins) they load via `dlopen`. Prior to policy `CMP0065`, CMake linked all executables with flags to export symbols, but the NEW behavior for that policy is to do so only for executables that have the `ENABLE_EXPORTS` target property set. In both cases, CMake has always used the AIX linker option `-bexpall` option to export symbols from executables. This has worked fairly well with the XL compiler, but with the GNU compiler it works only for C ABI symbols. The reason is that `-bexpall` does not export symbols starting in `_` but the GNU C++ ABI mangles all symbols with a leading `_`. Therefore we have only supported C ABI plugins with the GNU compiler on AIX. Some projects have tried to work around this by replacing `-bexpall` with `-bexpfull`, but the latter often exports symbols that we do not want exported. Avoid using `-bexpall` for executables by instead using by our own internal `ExportImportList` script to compute symbol export lists from the object files to be linked into an executable. Pass the explicitly computed export list to the AIX linker's `-bE:...` option. We already do this for shared object exports. Issue: #19163
| * | | | | | AIX: Explicitly compute shared object exports for both XL and GNUBrad King2019-07-153-20/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On AIX, symbols in shared objects must be exported in order to be visible to dependents (similar to Windows). The AIX linker provides a `-bE:...` option to specify a file listing symbols to be exported. Compilers offer some features to help: * When the XL compiler is invoked with its `-qmkshrobj`/`-G` options for creating shared objects (without/with runtime linking), it recognizes when no explicit `-bE:...` linker option is specified and runs a `CreateExportList` tool provided with the compiler to compute one from the object files. Since commit d468a2c2cb (XL: Avoid copying archives into shared libraries that link them, 2011-04-07, v2.8.5~153^2) CMake runs `CreateExportList` explicitly to ensure it only looks at the object files and not any library files. * When the GNU compiler is invoked with its `-shared` option for creating shared objects, its internal `collect2` tool recognizes when no explicit `-bE:...` linker option is specified and computes one itself from the object files. However, it sometimes includes extra symbols such as `.__init_aix_libgcc_cxa_atexit`. Introduce our own internal `ExportImportList` script to compute symbol export lists from object files. Use a basic implementation for now: it can be extended as needed later. Update our shared library creation rules to run the script explicitly for both the XL and GNU compilers. Issue: #19163
| * | | | | | AIX: Drop redundant -brtl flagsBrad King2019-07-152-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We removed `-brtl` in commit bce7a2a3a5 (AIX: Do not use -brtl to create shared libraries, 2013-03-11, v2.8.11~103^2~1) but it was added again by commit f254276fc1 (AIX,HP-UX: Fix RPATH handling when CMP0065 is set to NEW, 2015-12-11, v3.4.2~4^2). Since the latter commit we initialize the `CMAKE_{SHARED,MODULE}_LINKER_FLAGS` to use the `-brtl` linker flag. This is unnecessary because we already use the `-G` linker flag which implies `-brtl`. The latter commit also moved `-brtl` to `CMAKE_EXE_LINKER_FLAGS` from flags that were always included in executable link lines with CMP0065 OLD behavior and are not part of the change intended by CMP0065. Leave this for now as we've always enabled runtime linking for executables (and implicitly done so via -G for shared libraries and modules). Issue: #13997 Issue: #19163
| * | | | | | XL: De-duplicate shared object creation flagsBrad King2019-07-156-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The XL `-qmkshrobj` flag creates shared objects on all platforms. Move the flag out of the per-platform modules into the per-compiler module for XL.
* | | | | | | Merge topic 'FindPNG-msvc-static'Brad King2019-07-161-2/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 95f8b0aec7 FindPNG: Add static libpng names for MSVC Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3552
| * | | | | | | FindPNG: Add static libpng names for MSVCSteve Robinson2019-07-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add names produced by the png upstream buildsystem for static libraries with MSVC.
* | | | | | | | Merge topic 'FindMatlab/pre-2018-fixes'Brad King2019-07-161-81/+81
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cd6bd8391a FindMatlab: code comment and ordering of the finders 9e6206c59b FindMatlab: fixing extension bat file invocation error a9b36ea69f FindMatlab: Fixing compilation issues on Windows Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3554
| * | | | | | | FindMatlab: code comment and ordering of the findersRaffi Enficiaud2019-07-151-73/+69
| | | | | | | |
| * | | | | | | FindMatlab: fixing extension bat file invocation errorRaffi Enficiaud2019-07-151-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the environment variable MATLAB_ARCH is set prior to the call, the called scripts do not return an error message.
| * | | | | | | FindMatlab: Fixing compilation issues on WindowsRaffi Enficiaud2019-07-151-6/+1
| |/ / / / / /
* | | | | | | Merge topic 'FindBISON-CMP0088-SourcePath'Brad King2019-07-151-3/+9
|\ \ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f84d2045e9 FindBISON: Fix CMP0088 NEW behavior for non-absolute input paths Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3549
| * | | | | | FindBISON: Fix CMP0088 NEW behavior for non-absolute input pathsBrian Carlson2019-07-121-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the working directory is in the build tree, relative input paths must be converted to an absolute path to remain relative to the source directory. Fixes: #19472
* | | | | | | Merge topic 'soname'Brad King2019-07-151-2/+5
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6af97178ef Swift: support SONAME on ELFish targets Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3543
| * | | | | | Swift: support SONAME on ELFish targetsSaleem Abdulrasool2019-07-111-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.
* | | | | | | CMakeDetermineCompilerId: Consider UTF-16 encodings of INFO stringsBrad King2019-07-112-5/+8
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our compiler identification source encodes `INFO:compiler[...]` and similar strings in compiled objects or binaries that we then extract to get information about the compiler. With most compilers the strings are encoded in the binaries as a simple byte sequence. However, some compilers use other encodings. For example, the MS CSharp compiler uses UTF-16LE and a TI compiler uses UTF-16BE. Try each encoding. Fixes: #19459
* | | | | | Merge topic 'CheckSymbolExists-doc'Brad King2019-07-112-8/+31
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bf2244681b CheckSymbolExists: Add examples for check_symbol_exists cafaa5883a CheckCXXSymbolExists: Clarify documented role Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3522
| * | | | | | CheckSymbolExists: Add examples for check_symbol_existsHong Xu2019-07-102-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add examples in `CheckCXXSymbolExists` too. Co-Author: Brad King <brad.king@kitware.com>
| * | | | | | CheckCXXSymbolExists: Clarify documented roleBrad King2019-07-101-8/+9
| | | | | | |
* | | | | | | Merge topic 'fix/move-more-cpack-internals'Kyle Edwards2019-07-1017-4/+3
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 98617f1be0 Refactor: Move CPack internal files to `Internal/CPack/` directory Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3530
| * | | | | | | Refactor: Move CPack internal files to `Internal/CPack/` directoryAlex Turbov2019-07-0917-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some commits ago all CPack internal `*.cmake` files have been moved to `Internal/CPack/`. This commit also move some templates internally used by generators to the same location to make `Modules/` directory less noisy w/ files the end users don't need to use/see.
* | | | | | | | Merge topic 'elseif'Brad King2019-07-103-3/+3
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f4ed56ab63 Fix elseif() in place of else() Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Alex Turbov <i.zaufi@gmail.com> Acked-by: Rolf Eike Beer <eike@sf-mail.de> Merge-request: !3515
| * | | | | | | | Fix elseif() in place of else()Artalus2019-07-033-3/+3
| | | | | | | | |
* | | | | | | | | Merge topic 'implicit-includes-cray-hlist'Brad King2019-07-101-2/+2
|\ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0a7b61269c Merge branch 'backport-implicit-includes-cray-hlist' 98e371f13e Cray: Fix include parsing when the -hlist= flag is present Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3532
| * | | | | | | | Merge branch 'backport-implicit-includes-cray-hlist'Brad King2019-07-091-2/+2
| |\ \ \ \ \ \ \ \
| | * | | | | | | | Cray: Fix include parsing when the -hlist= flag is presentChuck Atkins2019-07-091-2/+2
| | | |_|_|/ / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update parsing logic from commit 5990ecb741 (Compute implicit include directories from compiler output, 2018-12-07, v3.14.0-rc1~108^2) to handle the quoting behavior caused by the `-hlist=` flag.
* | | | | | | | | Merge topic 'iar-riscv'Brad King2019-07-097-3/+20
|\ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / |/| | | | | | / / | | |_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | c242187875 IAR: Add support for the RISC-V compiler Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3510
| * | | | | | | IAR: Add support for the RISC-V compilerStefan Andersson2019-07-087-3/+20
| |/ / / / / /
* | | | | | | Merge topic 'fortran-submodule-cray'Brad King2019-07-081-0/+2
|\ \ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b0bcd4d7d2 Fortran: Add support for submodules on Cray 33de4d27eb Fortran: Support compilers using no module prefix on submodule files Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3504
| * | | | | | Fortran: Add support for submodules on CrayWillem Deconinck2019-07-081-0/+2
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define `CMAKE_Fortran_SUBMODULE_{SEP,EXT}` for the Cray Fortran compiler. Use an empty separator to tell CMake that this compiler does not use the enclosing module name as a prefix on submodule files. Issue: #18925
* | | | | | Merge topic 'pb-cxx11'Brad King2019-07-081-0/+5
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 59a30f2acf FindProtobuf: libprotoc also needs C++11 194adaf985 Tests: require C++11 for some protobuf tests Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3503
| * | | | | | FindProtobuf: libprotoc also needs C++11Rolf Eike Beer2019-07-031-0/+5
| | |_|_|/ / | |/| | | |
* | | | | | Merge topic 'threads-are-good'Brad King2019-07-081-6/+10
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 08cd7f6a02 Swift: support multithreaded compilation Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3506
| * | | | | Swift: support multithreaded compilationSaleem Abdulrasool2019-07-021-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Query the number of logical CPUs available to enable parallel compilation for Swift.
* | | | | | Merge topic 'FindPostgreSQL-lib-dir'Brad King2019-07-031-1/+8
|\ \ \ \ \ \ | |/ / / / / |/| | | | / | | |_|_|/ | |/| | | | | | | | | | | | | d21b890a4c FindPostgreSQL: Fix regression in computation of library directory Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3505
| * | | | FindPostgreSQL: Fix regression in computation of library directoryBrad King2019-07-021-1/+8
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 368bcba28a (FindPostgreSQL: Find debug lib, imported configs, 2019-05-09, v3.15.0-rc1~93^2) the `PostgreSQL_LIBRARY` variable may contain a list and therefore should not be passed to the `get_filename_component` command directly. Instead spell out the logic to compute `PostgreSQL_LIBRARY_DIR` from one of the per-configuration variables. Fixes: #19444
* | | | Merge topic 'static'Brad King2019-07-021-0/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8aa0b63bc6 Swift: add rules for static linking Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3492
| * | | | Swift: add rules for static linkingSaleem Abdulrasool2019-06-271-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.
* | | | Merge topic 'FindMPI-AddSuffixes'Marc Chevrier2019-07-021-2/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5affe415a3 FindMPI: Add MPI_EXECUTABLE_SUFFIX to every item in lists Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3496
| * | | | FindMPI: Add MPI_EXECUTABLE_SUFFIX to every item in listsBrian Carlson2019-06-291-2/+6
| |/ / / | | | | | | | | | | | | | | | | | | | | Add the `${MPI_EXECUTABLE_SUFFIX}` to each of the items in the `_MPI_${id}_${LANG}_COMPILER_NAMES` and `_MPI_${LANG}_GENERIC_COMPILER_NAMES` rather than just adding the suffix to the last item in each list.
* | | | Merge topic 'override-rules-RC'Brad King2019-07-011-0/+11
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d2f20ab217 RC: Honor CMAKE_USER_MAKE_RULES_OVERRIDE Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3489
| * | | | RC: Honor CMAKE_USER_MAKE_RULES_OVERRIDEBrad King2019-06-271-0/+11
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the refactoring in commit 48f7e2d300 (Unhardcode the CMAKE_CONFIGURATION_TYPES values, 2017-11-27, v3.11.0-rc1~130^2~1), `CMAKE_BUILD_TYPE` is initialized while enabling the RC language. Therefore we need to honor `CMAKE_USER_MAKE_RULES_OVERRIDE` as part of enabling RC so that a `CMAKE_BUILD_TYPE_INIT` setting in the override file is honored. Fixes: #19401