summaryrefslogtreecommitdiffstats
path: root/Modules/GetPrerequisites.cmake
Commit message (Collapse)AuthorAgeFilesLines
* GetPrerequisites: Classify vcruntime libraries as systemErr0rC0deX2020-03-191-3/+3
| | | | | Previously GetPrerequisites classified `vcruntime*.dll` as type "other". They should be classified as type "system".
* GetPrerequisites: match ldd output on SolarisJon Chronopoulos2019-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Solaris output is the following: ``` $ ldd /lib/libxml2.so libz.so.1 => /lib/libz.so.1 libm.so.2 => /lib/libm.so.2 libc.so.1 => /lib/libc.so.1 ``` While on Linux ``` $ ldd /usr/lib/libxml2.so linux-vdso.so.1 (0x00007ffe02bbe000) libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f03ab852000) libicuuc.so.64 => /usr/lib/libicuuc.so.64 (0x00007f03ab67a000) libz.so.1 => /usr/lib/libz.so.1 (0x00007f03ab463000) liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f03ab23d000) libm.so.6 => /usr/lib/libm.so.6 (0x00007f03ab0f7000) libc.so.6 => /usr/lib/libc.so.6 (0x00007f03aaf34000) /usr/lib64/ld-linux-x86-64.so.2 (0x00007f03ab9fd000) libicudata.so.64 => /usr/lib/libicudata.so.64 (0x00007f03a94ee000) libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f03a94cd000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f03a92e5000) libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f03a92cb000) ```
* GetPrerequisites: use CMAKE_OBJDUMP if it is setRolf Eike Beer2019-06-191-1/+3
|
* GetPrerequisites: Add deprecation noticeKyle Edwards2019-06-101-0/+4
| | | | | GetPrerequisites has now been superceded by file(GET_RUNTIME_DEPENDENCIES), so add a deprecation notice stating such.
* GetPrerequisites: fix regression in gp_append_uniqueBen Boeckel2019-06-041-1/+1
| | | | | | The `item` variable was the loop variable in the old code prior to commit 3dfc8b9bd6 (GetPrerequisites: use if(IN_LIST) instead of foreach, 2019-05-09). The function argument `value` should be used instead.
* GetPrerequisites: use if(IN_LIST) instead of foreachBen Boeckel2019-05-231-10/+6
|
* GetPrerequisites: Fix handling of executable scriptsAlexander Grund2019-01-041-0/+9
| | | | Fixes: #18667
* GetPrerequisites: Allow prefixed toolsAlexander Grund2018-12-311-10/+10
| | | | e.g. for cross-compilation with e.g. x86_64-pc-linux-gnu-ldd
* GetPrerequisites: Add GET_PREREQUISITES_VERBOSE to set verboseAlexander Grund2018-12-311-0/+7
|
* GetPrerequisites: Don't use hardcoded name for otoolAlexander Grund2018-12-301-1/+1
|
* Help: Convert remaining modules to block-style commentsKitware Robot2018-10-221-163/+164
|
* GetPrerequisites: Move dylibs from MacOS to Frameworks folder in bundleHarry Mallon2018-07-241-14/+4
| | | | Fixes: #16828
* Modules: Remove paths set as global Unix prefixesChristian Pfeiffer2017-11-201-2/+0
| | | | | This commit removes hardcoded paths that are already given in the platform files or in `UnixPath` on a global level.
* GetPrerequisites: Restore behavior on missing binary of not clearing listBrad King2017-09-261-1/+0
| | | | | | | | | | | | | | | | Prior to commit v3.4.0-rc1~264^2~1 (GetPrerequisites: Add error checks for execute_process() calls, 2015-07-29), `get_prerequisites` would simply warn on a missing binary and not update the result list at all. That commit accidentally made the case an error. This was fixed by commit v3.8.0-rc1~110^2 (GetPrerequisites: Do not fail on files we cannot find, 2017-01-10), but the fix also cleared the result list. Clearing the list is incorrect because it is supposed to be able to accumulate results over multiple calls. Remove the list clearing behavior to restore the original behavior on a missing binary. Fixes: #17306
* GetPrerequisites: Do not warn about non-absolute UCRT system librariesBrad King2017-06-261-1/+1
| | | | Issue: #17007
* GetPrerequisites: Only recurse on resolved unseen prerequisitesGuillaume Dumont2017-05-111-1/+5
| | | | | | | | I encountered an issue where not all prerequisites would be listed by `get_prerequisites` since some of the prerequisites cannot be resolved and are added to the list of unseen prerequisites. This has the side effect of clearing the list of `prerequisites_var` and thus removes some prerequisites from the list. Fix it.
* Modules: Add x32-abi support to hard-coded pathsSteven Newbury2017-03-071-1/+1
| | | | | Update hard-coded library paths in bundled CMake Modules for libx32 as used with x32-abi.
* GetPrerequisites: also try to resolve just the basenameMichael Maltese2017-02-221-0/+5
| | | | Fixes #16625.
* Merge topic 'get_prerequisites_delayload'Brad King2017-01-121-0/+14
|\ | | | | | | | | a7c5d5fb GetPrerequisites: Exclude delay load dependencies on Windows
| * GetPrerequisites: Exclude delay load dependencies on WindowsPascal Thomet2017-01-111-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With some Windows toolchains we use `objdump` which does not mention delay load dependencies in its output. Therefore, to get consistent behavior we should always ignore them. Use the `dumpbin` message "Image has the following delay load dependencies" that precedes the delay load dependencies to recognize and skip them. Fortunately, this message is not translated to the current locale (at least on "Windows 7 French", "Windows 10 French" and "Windows Server 2008 R2 French"). Fixes: #16241
* | GetPrerequisites: Do not fail on files we cannot findMartin Koegler2017-01-111-0/+2
|/ | | | | | | | | | | Historically we have always warned and skipped missing files. Since commit v3.4.0-rc1~264^2~1 (GetPrerequisites: Add error checks for execute_process() calls, 2015-07-29) we fail instead, but this was not an intentional part of that change. Restore the warn-only behavior so that missing system libraries (e.g. during cross-compiling) do not cause failure. Closes: #16523
* GetPrerequisites: Fix call to find_program for `ri` toolMartin Koegler2016-12-121-2/+2
| | | | | `find_program` does not work with `${a};${b}` as a search path. Use separate arguments to `PATHS`.
* Simplify CMake per-source license noticesBrad King2016-09-271-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* GetPrerequisites: Recognize absolute paths to UCRT system librariesBrad King2016-09-081-2/+2
| | | | | | | | | | The matching expression added by commit v3.5.0-rc1~33^2 (GetPrerequisites: Define api-ms-win-* files as system libraries, 2016-01-19) did not account for absolute paths to the UCRT libraries. We already recognize absolute paths to the MSVC runtime libraries. Do this for UCRT libraries too. Issue: #16240
* Merge topic 'GetPrerequisites-fix-regression'Brad King2016-08-151-2/+6
|\ | | | | | | | | a2d5c25a GetPrerequisites: Fix regression in gp_resolved_file_type
| * GetPrerequisites: Fix regression in gp_resolved_file_typeBrad King2016-08-121-2/+6
| | | | | | | | | | | | | | | | | | | | Since commit v3.6.0-rc1~287^2 (GetPrerequisites: Fix gp_resolved_file_type on non-canonical paths, 2016-03-08) we accidentally convert relative paths (e.g. system dll file names) to absolute paths even when we do not know the base directory. Fix this by canonicalizing only paths that are already absolute. Closes: #16240
| * GetPrerequisites: fix typo in commentRolf Eike Beer2016-06-221-1/+1
| |
* | GetPrerequisites: Always filter objdump output as textAlexander Shishenko2016-08-081-1/+1
| | | | | | | | | | | | When using `grep` to filter the output, add the `-a` flag to tell it never to treat the output as binary. Otherwise when LANG != C in the environment the non-ascii text may break the filter.
* | Use string(APPEND) in ModulesDaniel Pfeifer2016-07-271-1/+1
| | | | | | | | | | | | | | Automate with: find Modules -type f -print0 | xargs -0 perl -i -0pe \ 's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
* | GetPrerequisites: fix typo in commentRolf Eike Beer2016-06-231-1/+1
| |
* | GetPrerequisites: Optimize on Windows by filtering `objdump` outputLaurent Tarrisse2016-06-211-1/+5
|/ | | | | | Extend the optimization from commit v3.4.0-rc1~264^2 (GetPrerequisites: Optionally filter "objdump" output for speed, 2015-07-29) to work on Windows by using `findstr` in place of `grep`.
* GetPrerequisites: Look for VS tools using registry entries (#16108)Brad King2016-05-251-0/+7
|
* GetPrerequisites: Look for VS tools using environment variablesBrad King2016-04-081-0/+7
| | | | | | The `VS*COMNTOOLS` environment variables specify locations of VS tools and are set during the VS installation. Use them in addition to the hard-coded default install locations.
* GetPrerequisites: add path of VS 10,11,12,14 in order to find dumpbin.exeFARBOS Arnaud2016-04-081-0/+4
|
* GetPrerequisites: Fix gp_resolved_file_type on non-canonical pathsBrad King2016-03-081-0/+2
| | | | | | | | | | Canonicalize the input paths so we treat them both consistently, in particular when comparing them via string operations. This is needed for calls like fixup_bundle("${CMAKE_INSTALL_PREFIX}/../test" ...) Suggested-by: Benjamin Ballet <bballet@ivsweb.com>
* GetPrerequisites: Define api-ms-win-* files as system libraries (#15691)André Klitzing2016-01-191-2/+2
| | | | Suggested-by: Gilles Khouzam <gillesk@microsoft.com>
* GetPrerequisites: Optionally filter "objdump" output for speedBill Somerville2015-07-311-0/+8
| | | | | | | | | | | | | | | | | | | As dumpbin.exe is no longer reliable for gcc libraries on MinGW because it crashes on many common libraries like libgcc_s and libgfortran it is now necessary too resort to using objdump for DLL dependency walking. Using objdump has a secondary problem in that it generates a lot of output for large libraries and causes fixup_bundle() to take many minutes to process what took fractions of a second with "dumpbin.exe /dependents". Add a 'grep' pre-filter in the execute_process() command pipeline to reduce this output to a minimum for a several orders of magnitude speed up. If grep is not available just use the full output. As there does not seem to be a reliable way of detecting MinGW, callers of fixup_bundle() may have to set the variable gp_tool to "objdump" if dumpbin.exe is installed on the build machine to stop it using the broken MS dumpbin.exe for library dependency walking.
* GetPrerequisites: Add error checks for execute_process() callsBill Somerville2015-07-311-0/+30
| | | | | Add return status checks to external command invocations so that they do not fail silently producing incomplete install packages.
* Modules: Check for ARGC before using ARGV#Daniele E. Domenichelli2015-02-271-12/+24
| | | | ARGV# could be defined from a parent scope.
* GetPrerequisites: Update output matching for newer 'file' versionsMarcus Meissner2015-02-231-0/+7
| | | | | | | | | | | | | Detect PIE binaries with newer 'file' (5.22). It no longer prints "(uses shared libraries)" but does print "interpreter": # file 5.19 $ file /usr/bin/su /usr/bin/su: ... shared object, ..., dynamically linked (uses shared libs), ... # file 5.22 $ file /usr/bin/su /usr/bin/su: ... shared object, ..., dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, ...
* GetPrerequisites: join if() clausesRolf Eike Beer2014-11-251-18/+4
| | | | | | These all test the same variable for different values, so only one of them can ever be true. This also allows to completely remove one variable that only flagged if one of the conditions matched.
* GetPrerequisites: remove needless variable dereferencingRolf Eike Beer2014-11-251-15/+15
|
* BundleUtilities: Resolve & replace @rpath placeholdersAdam Strzelecki2014-10-101-9/+14
| | | | | | | | | | | | | | | This is done by gathering LC_RPATH commands for main bundle executable and using it for @rpath lookup in dependent frameworks. All functions that need to carry rpaths to now take optional <rpaths> argument. This enabled apps using @rpath to be bundled correctly, which will be necessary for upcoming Qt 5.4 that will use @rpath for all frameworks. Check that install_name_tool has -delete_rpath before using it. Otherwise it will fail with Xcode 3.x on 10.5 which has no -delete_rpath option for install_name_tool command, that was first introduced in 10.6 SDK, even that 10.5 supports LC_RPATH and @rpath.
* GetPrerequisites: Make sure dyld placeholders are prefixesAdam Strzelecki2014-10-101-3/+3
| | | | | Mac OS X dyld placeholders should be always prefixes, otherwise this can lead to some undefined behavior.
* Replace string(REGEX REPLACE) with string(REPLACE) where possibleRolf Eike Beer2014-04-141-4/+4
| | | | The simple replacement is much faster.
* GetPrerequisites: Preserve search path order from caller.Clinton Stimpson2013-11-141-2/+4
|
* Convert builtin help to reStructuredText source filesKitware Robot2013-10-151-76/+129
| | | | | | | | Run the convert-help.bash script to convert documentation: ./convert-help.bash "/path/to/CMake-build/bin" Then remove it.
* VS: Avoid leaking child process output back to IDE (#14266)Brad King2013-07-161-1/+0
| | | | | | | | | | | | | | The VS IDE sets the environment variable VS_UNICODE_OUTPUT when executing build rules in order to tell MS tools to report output through a back door instead of through stdout/stderr. Unset this variable so that CMake can capture or properly redirect all output from processes it runs even when running inside a VS IDE build environment. This generalizes the special cases fixed by commit 80d045b0 (When GetPrerequisites.cmake runs dumpbin while running inside the VS IDE..., 2008-05-01) and commit 44aff73d (ExternalProject: Avoid bleed-through output when logging, 2011-01-06), so drop special handling of VS_UNICODE_OUTPUT in those instances.
* GetPrerequisites: Add documentation for objdumpMichael Tänzer2013-03-011-0/+1
| | | | Signed-off-by: Michael Tänzer <neo@nhng.de>
* GetPrerequisites: Add support for objdumpMichael Tänzer2013-02-281-2/+18
| | | | | | Make it usable on MinGW without Visual Studio installed. Signed-off-by: Michael Tänzer <neo@nhng.de>