summaryrefslogtreecommitdiff
path: root/Modules/GetPrerequisites.cmake
Commit message (Collapse)AuthorAgeFilesLines
* GetPrerequisites: Ignore relative paths printed by lddĐoàn Trần Công Danh2023-02-201-1/+1
| | | | | | | | | | | | | On x86 Linux, the ldd output for its vDSO (linux-gate.so.1) is a bit different from other Linux with standard vDSO name (linux-vdso.so.1). $ ldd /bin/ls linux-gate.so.1 => linux-gate.so.1 (0xf7f5e000) libcap.so.2 => /usr/lib32/libcap.so.2 (0xf7f22000) libc.so.6 => /usr/lib32/libc.so.6 (0xf7cfb000) /lib/ld-linux.so.2 => /usr/lib32/ld-linux.so.2 (0xf7f60000) This fixes the `Tests/BundleUtilities` test on x86 Linux.
* GetPrerequisties: pass "-a" only to grep.Mehdi Chinoune2022-03-251-1/+3
|
* GetPrerequisites: Support CMAKE_OBJDUMP with .exe extensionDaniel Schlegel2021-09-281-1/+1
| | | | | | | When running `fixup_bundle` in a MSYS environment it fails because `gp_tool` resolves to `objdump.exe` and not just `objdump`. Fixes: #22381
* Modules: Fix typos and spelling in documentationJosef Angstenberger2021-05-071-1/+1
|
* Merge topic 'macos-include-weak-dependencies'Brad King2021-01-211-1/+1
|\ | | | | | | | | | | | | | | 7e615a540e file(GET_RUNTIME_DEPENDENCIES): Fix weak macOS libraries not detected f2d92b983b GetPrerequisites: Include weak macOS dependencies Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5703
| * GetPrerequisites: Include weak macOS dependenciesBianca van Schaik2021-01-201-1/+1
| | | | | | | | | | | | | | Starting with Clang 12, `otool -L` adds `, weak` to weakly linked libraries. Update GetPrerequisites to recognize these. Issue: #21684
* | Help: Add `.. versionadded` directives to module docsNikita Nemkin2020-12-021-5/+6
|/ | | | Issue: #19715
* Fix typos identified using codespellJean-Christophe Fillion-Robin2020-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://github.com/codespell-project/codespell#readme The following command was used: ``` codespell -q6 --skip="\ .git,\ *.json,\ ./Copyright.txt,\ ./Help/command/foreach.rst,\ ./Help/prop_test/REQUIRED_FILES.rst,\ ./Help/variable/CTEST_COVERAGE_COMMAND.rst,\ ./Modules/CMakeCheckCompilerFlagCommonPatterns.cmake,\ ./Modules/CMakeRCInformation.cmake,\ ./Modules/Internal/CPack/NSIS.template.in,\ ./Modules/FindMatlab.cmake,\ ./Modules/MatlabTestsRedirect.cmake,\ ./Modules/Platform/Windows-Clang.cmake,\ ./Modules/Platform/Windows-Intel-Fortran.cmake,\ ./Modules/Platform/Windows-MSVC.cmake,\ ./Source/CMakeVersion.cmake,\ ./Source/cmConvertMSBuildXMLToJSON.py,\ ./Source/cmCreateTestSourceList.cxx,\ ./Source/cmGlobalVisualStudio10Generator.cxx,\ ./Source/cmExportBuildFileGenerator.cxx,\ ./Source/cmExportInstallAndroidMKGenerator.cxx,\ ./Source/cmExportInstallFileGenerator.cxx,\ ./Source/cmExportSet.cxx,\ ./Source/cmExportTryCompileFileGenerator.cxx,\ ./Source/cmFindPackageCommand.cxx,\ ./Source/cmInstallCommand.cxx,\ ./Source/cmGeneratorExpressionLexer.cxx,\ ./Source/cmLocalVisualStudio7Generator.cxx,\ ./Source/cmOrderDirectories.cxx,\ ./Source/cmTarget.cxx,\ ./Source/kwsys/*,\ ./Source/QtDialog/CMakeSetupDialog.ui,\ ./Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx,\ ./Source/CTest/cmParseCoberturaCoverage.h,\ ./Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt,\ ./Tests/RunCMake/GoogleTest/xml_output.cpp,\ ./Tests/RunCMake/Make/TargetMessages*,\ ./Utilities/*,\ " \ -L "\ dependees,\ endwhile,\ fo,\ filetest,\ helpfull,\ nd,\ objext,\ stoll,\ supercedes,\ superceded,\ vas,\ varn,\ " ```
* 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-051-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-281-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
|