summaryrefslogtreecommitdiffstats
path: root/Modules/GetPrerequisites.cmake
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* GetPrerequisites: Move tool search paths upMichael Tänzer2013-02-281-17/+18
| | | | | | Make them usable in the gp_tool selection heuristic. Signed-off-by: Michael Tänzer <neo@nhng.de>
* GetPrerequisites: Mark file_cmd as advanced cache entryBrad King2012-08-141-0/+1
| | | | | This internal implementation detail should not pollute the main cache view of projects that include GetPrerequisites.
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-97/+97
| | | | | | | | | | | | | | | | | Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
* GetPrerequisites.cmake: detect executables built with the -pie linker flag.Clinton Stimpson2012-07-051-0/+8
|
* GetPrerequisites: Add support for @rpath on Mac OS X.Clinton Stimpson2012-01-201-6/+11
| | | | | | Change to consider a library embedded if it is found in a subdirectory relative to the using executable/library. Previous commit considered them local. This case is encountered when @rpath is used with framework libraries, which are inside a directory tree.
* GetPrerequisites: Add support for @rpath on Mac OS X.Clinton Stimpson2011-11-211-3/+27
| | | | | | | | Handle @rpath much like other Unixes, by doing a find_file with the given directories. Also, consider a library to be local if it is found in the same directory or a subdirectory relative to the user executable/library. Previously, it was local only if found in the same directory. This case is encountered when @rpath is used with framework libraries, which are inside a directory tree.
* Usage: Add missing exepath argument in get_prerequisites documentation.Nicolas Despres2011-10-231-1/+1
|
* BundleUtilities: Fix regex to extract dependents from ldd (#12034)Clinton Stimpson2011-05-311-1/+1
| | | | This regex works with spaces in the path.
* BundleUtilities: Work w/ non .app exes on Mac (#12034)Clinton Stimpson2011-05-271-2/+2
| | | | | | | | | | | | Also add a test of BundleUtilities including an exe, some shared libs, a plugin, and a framework-style lib. This test presently runs (and this functionality works) on Linux, Mac and Windows. For now, the framework-style lib is built as a plain old shared lib because there is another yet-unresolved issue with local frameworks without rpaths on the Mac.
* Fixes to GetPrerequisites for cygwinDavid Partyka2010-10-271-8/+28
| | | | Fix IF(WIN32) guards check for cygwin. Fix checking if the depenency is in a system location to use cygwin style paths on cygwin. Also change GetPrerequisites to switch gp_tool to tools that are very unlikely to be found, ie. dumpbin on Apple and otool on Windows/Unix.
* Append the gp_tool path to the system PATH using native slashes.David Partyka2010-10-261-0/+1
|