diff options
author | Brad King <brad.king@kitware.com> | 2017-01-12 15:21:30 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2017-01-12 15:21:30 (GMT) |
commit | bc09abd7d07064ed046cdc8e959b443d69f77596 (patch) | |
tree | 1db21aa41a1decd625491529701a67c8e312e03a /Modules/GetPrerequisites.cmake | |
parent | b4f7ce5c79bf06292deaad8097da7889eddc2886 (diff) | |
parent | a7c5d5fb0e8d096dfc9b6e82e93f1e0d6225fe1f (diff) | |
download | CMake-bc09abd7d07064ed046cdc8e959b443d69f77596.zip CMake-bc09abd7d07064ed046cdc8e959b443d69f77596.tar.gz CMake-bc09abd7d07064ed046cdc8e959b443d69f77596.tar.bz2 |
Merge topic 'get_prerequisites_delayload'
a7c5d5fb GetPrerequisites: Exclude delay load dependencies on Windows
Diffstat (limited to 'Modules/GetPrerequisites.cmake')
-rw-r--r-- | Modules/GetPrerequisites.cmake | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake index d6a78de..1b23800 100644 --- a/Modules/GetPrerequisites.cmake +++ b/Modules/GetPrerequisites.cmake @@ -812,6 +812,20 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa OUTPUT_VARIABLE gp_cmd_ov ERROR_VARIABLE gp_ev ) + + if(gp_tool STREQUAL "dumpbin") + # Exclude delay load dependencies under windows (they are listed in dumpbin output after the message below) + string(FIND "${gp_cmd_ov}" "Image has the following delay load dependencies" gp_delayload_pos) + if (${gp_delayload_pos} GREATER -1) + string(SUBSTRING "${gp_cmd_ov}" 0 ${gp_delayload_pos} gp_cmd_ov_no_delayload_deps) + string(SUBSTRING "${gp_cmd_ov}" ${gp_delayload_pos} -1 gp_cmd_ov_delayload_deps) + if (verbose) + message(STATUS "GetPrequisites(${target}) : ignoring the following delay load dependencies :\n ${gp_cmd_ov_delayload_deps}") + endif() + set(gp_cmd_ov ${gp_cmd_ov_no_delayload_deps}) + endif() + endif() + if(NOT gp_rv STREQUAL "0") if(gp_tool STREQUAL "dumpbin") # dumpbin error messages seem to go to stdout |