summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* AIX: Explicitly compute executable exports for both XL and GNUBrad King2019-07-158-9/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 'cleanup-gen-lookups'Brad King2019-07-1512-64/+67
|\ | | | | | | | | | | | | | | | | 7ff9ab3b10 Makefile: De-duplicate executable link rule lookup 79f5ef19fe De-duplicate checks for whether a platform uses Windows DLLs 22d3eb5d5e Refactor checks for whether a target has an import library Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3550
| * Makefile: De-duplicate executable link rule lookupBrad King2019-07-121-3/+2
| | | | | | | | Use `GetCreateRuleVariable` instead of duplicating the variable lookup.
| * De-duplicate checks for whether a platform uses Windows DLLsBrad King2019-07-125-15/+15
| |
| * Refactor checks for whether a target has an import libraryBrad King2019-07-128-46/+50
| | | | | | | | Use `HasImportLibrary` for such checks.
* | Merge topic 'modernize-cmCommand-memory-management'Brad King2019-07-15177-462/+1132
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 1591f138f1 modernize: manage cmCommand instances using unique_ptr. d9b2c7dae2 Introduce memory management helper: cm_memory.hxx Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Sebastian Holtermann <sebholt@web.de> Merge-request: !3513
| * | modernize: manage cmCommand instances using unique_ptr.Marc Chevrier2019-07-14136-399/+1014
| | |
| * | Introduce memory management helper: cm_memory.hxxMarc Chevrier2019-07-1444-63/+118
| | |
* | | Merge branch 'release-3.15'Brad King2019-07-150-0/+0
|\ \ \
| * \ \ Merge branch 'FindBISON-CMP0088-SourcePath' into release-3.15Brad King2019-07-122-3/+17
| |\ \ \ | | | | | | | | | | | | | | | Merge-request: !3549
* | \ \ \ Merge branch 'release-3.14'Brad King2019-07-150-0/+0
|\ \ \ \ \
| * \ \ \ \ Merge branch 'FindBISON-CMP0088-SourcePath' into release-3.14Brad King2019-07-122-3/+17
| |\ \ \ \ \ | | | |/ / / | | |/| | | | | | | | | Merge-request: !3549
* | | | | | Merge topic 'FindBISON-CMP0088-SourcePath'Brad King2019-07-152-3/+17
|\ \ \ \ \ \ | | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-122-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | CMake Nightly Date StampKitware Robot2019-07-151-1/+1
| |_|_|_|/ / |/| | | | |
* | | | | | CMake Nightly Date StampKitware Robot2019-07-141-1/+1
| | | | | |
* | | | | | CMake Nightly Date StampKitware Robot2019-07-131-1/+1
| | | | | |
* | | | | | Merge topic 'cleanup-statics-stream-flush'Craig Scott2019-07-134-115/+103
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | af75ab7645 Refactor: Use anonymous namespace instead of `static`s in `cpack.cxx` 0db458a0ce Refactor: Use anonymous namespace instead of `static`s 0328b64efd Refactor: Remove one-time used macros b821f9ad62 Refactor: Optimize some stream output operations Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3535
| * | | | | | Refactor: Use anonymous namespace instead of `static`s in `cpack.cxx`Alex Turbov2019-07-091-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
| * | | | | | Refactor: Use anonymous namespace instead of `static`sAlex Turbov2019-07-091-61/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
| * | | | | | Refactor: Remove one-time used macrosAlex Turbov2019-07-091-31/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
| * | | | | | Refactor: Optimize some stream output operationsAlex Turbov2019-07-093-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - remove redundant `std::flush` right after `std::endl` - join some string literals Signed-off-by: Alex Turbov <i.zaufi@gmail.com>
* | | | | | | Merge topic 'cmake-e-true-false'Brad King2019-07-126-0/+29
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b8828ecbba cmake -E: Add true and false commands Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3542
| * | | | | | | cmake -E: Add true and false commandsKyle Edwards2019-07-116-0/+29
| | |/ / / / / | |/| | | | |
* | | | | | | Merge topic 'ctest_make_program__propagated_to_cmake_configure_pass'Brad King2019-07-124-102/+60
|\ \ \ \ \ \ \ | |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cd681f1f41 ctest: propagate make program to cmake Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3483
| * | | | | | ctest: propagate make program to cmakeRobert Maynard2019-07-114-102/+60
| | | | | | |
* | | | | | | Merge topic 'compiler-id-encoding'Brad King2019-07-122-5/+8
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d1f38ba65d CMakeDetermineCompilerId: Consider UTF-16 encodings of INFO strings Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3539
| * | | | | | | 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 branch 'release-3.15'Brad King2019-07-120-0/+0
|\ \ \ \ \ \ \ \ | | |_|_|_|_|_|/ | |/| | | | | |
| * | | | | | | Merge branch 'object-library-sbcs' into release-3.15Brad King2019-07-121-1/+1
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge-request: !3537
* | \ \ \ \ \ \ \ Merge topic 'object-library-sbcs'Brad King2019-07-121-1/+1
|\ \ \ \ \ \ \ \ \ | | |/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 54290adcba VS: Fix SBCS support for object libraries Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3537
| * | | | | | | | VS: Fix SBCS support for object librariesBrad King2019-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 3a53005f7d (Build object library targets in VS, 2012-03-12, v2.8.8~29^2~13) we updated the condition for unicode but accidentally left out the SBCS case support for object libraries. Fixes: #19469
* | | | | | | | | CMake Nightly Date StampKitware Robot2019-07-121-1/+1
| | | | | | | | |
* | | | | | | | | Merge branch 'release-3.15'Brad King2019-07-110-0/+0
|\ \ \ \ \ \ \ \ \ | | |/ / / / / / / | |/| | | / / / / | |_|_|_|/ / / / |/| | | | | | |
| * | | | | | | Merge branch 'fortran-submodule-cray' into release-3.15Brad King2019-07-112-1/+9
| |\ \ \ \ \ \ \ | | |/ / / / / / | |/| | | | | | | | | | | | | | Merge-request: !3504
* | | | | | | | Merge topic 'rel-scripts'Brad King2019-07-111-30/+14
|\ \ \ \ \ \ \ \ | |_|_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 329f0a64b0 Utilities/Release: Replace batch scripts with individual scripts Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3540
| * | | | | | | Utilities/Release: Replace batch scripts with individual scriptsBrad King2019-07-111-30/+14
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | Provide a more granular per-platform workflow.
* | | | | | | Merge topic 'iwyu-memory'Brad King2019-07-1188-69/+104
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 71fbebd1dc IWYU: Fix handling of <memory> standard header Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Marc Chevrier <marc.chevrier@gmail.com> Merge-request: !3536
| * | | | | | | IWYU: Fix handling of <memory> standard headerBrad King2019-07-1088-69/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An old workaround for `std::allocator_traits<>::value_type` lints from IWYU on `std::vector<>` usage breaks IWYU's handling of `<memory>`. Convert the workaround to use the same approach we already use for a workaround of `std::__decay_and_strip<>::::__type` lints. Then update the `<memory>` inclusions to follow the now-correct IWYU lints.
* | | | | | | | 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_ctest_output'Brad King2019-07-115-9/+96
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adcbdb143c CTest: Clean up stdout and logfile output for Pass/Fail regex Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3509
| * | | | | | | | | CTest: Clean up stdout and logfile output for Pass/Fail regexStephen Manz2019-07-095-9/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For pass regex, display only the element that was found, rather than all elements Rename loop variable for fail regex, from pass to fail For consistency, add space in output for pass Add tests that find and don't find PASS_REGULAR_EXPRESSION, and a test that finds FAIL_REGULAR_EXPRESSION, whose LastTest.log files are checked using *-check.cmake.
* | | | | | | | | | Merge topic 'eclipse-resource-encoding'Brad King2019-07-116-0/+40
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 09c1991895 Eclipse: Add option to set the resource encoding Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3525