summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/SharedForward.h.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-08-31 23:41:53 (GMT)
committerBrad King <brad.king@kitware.com>2005-08-31 23:41:53 (GMT)
commit2e004e03ca4dce75a9d0462874c4fd6199b30581 (patch)
tree012bcc26d58009a9db87db3d9bb1e584d7d6323d /Source/kwsys/SharedForward.h.in
parent9770d27e53ba2686ea2277078835eddd7cbb3557 (diff)
downloadCMake-2e004e03ca4dce75a9d0462874c4fd6199b30581.zip
CMake-2e004e03ca4dce75a9d0462874c4fd6199b30581.tar.gz
CMake-2e004e03ca4dce75a9d0462874c4fd6199b30581.tar.bz2
ENH: Added cygcheck knowledge for --ldd option on Cygwin. Added error message for --ldd option when no tool is available but the option was still requested.
Diffstat (limited to 'Source/kwsys/SharedForward.h.in')
-rw-r--r--Source/kwsys/SharedForward.h.in12
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/kwsys/SharedForward.h.in b/Source/kwsys/SharedForward.h.in
index 46b9657..67ad58c 100644
--- a/Source/kwsys/SharedForward.h.in
+++ b/Source/kwsys/SharedForward.h.in
@@ -219,7 +219,10 @@ static const char kwsys_shared_forward_path_slash[2] = {KWSYS_SHARED_FORWARD_PAT
/* Windows */
#if defined(_WIN32)
-# undef KWSYS_SHARED_FORWARD_OPTION_LDD
+# if defined(__CYGWIN__)
+# define KWSYS_SHARED_FORWARD_LDD "cygcheck"
+# define KWSYS_SHARED_FORWARD_LDD_N 1
+# endif
# define KWSYS_SHARED_FORWARD_LDPATH "PATH"
#endif
@@ -622,6 +625,8 @@ static int @KWSYS_NAMESPACE@_shared_forward_to_real(int argc, char** argv)
/* Look for the ldd command line option. */
if(argc > 1 && strcmp(argv[1], KWSYS_SHARED_FORWARD_OPTION_LDD) == 0)
{
+# if defined(KWSYS_SHARED_FORWARD_LDD)
+ /* Use the named ldd-like executable and arguments. */
char* ldd_argv[] = {KWSYS_SHARED_FORWARD_LDD, 0, 0};
ldd_argv[KWSYS_SHARED_FORWARD_LDD_N] = exe;
kwsys_shared_forward_execvp(ldd_argv[0], ldd_argv);
@@ -629,6 +634,11 @@ static int @KWSYS_NAMESPACE@_shared_forward_to_real(int argc, char** argv)
/* Report why execution failed. */
kwsys_shared_forward_print_failure(ldd_argv);
return 1;
+# else
+ /* We have no ldd-like executable available on this platform. */
+ fprintf(stderr, "No ldd-like tool is known to this executable.\n");
+ return 1;
+# endif
}
#endif