summaryrefslogtreecommitdiffstats
path: root/Tests/BundleUtilities/testbundleutils3.cpp
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2012-01-20 05:03:06 (GMT)
committerClinton Stimpson <clinton@elemtech.com>2012-01-20 05:03:06 (GMT)
commit0d96decdd069451c9b805e411abe0fc6225c8ee9 (patch)
treedc0b5ceab518afd1eba43d104bbe3a4da8533c88 /Tests/BundleUtilities/testbundleutils3.cpp
parent880139a6421649b9b3ff8048418cd556e7ddf2c1 (diff)
downloadCMake-0d96decdd069451c9b805e411abe0fc6225c8ee9.zip
CMake-0d96decdd069451c9b805e411abe0fc6225c8ee9.tar.gz
CMake-0d96decdd069451c9b805e411abe0fc6225c8ee9.tar.bz2
GetPrerequisites: Add test for @rpath support.
Diffstat (limited to 'Tests/BundleUtilities/testbundleutils3.cpp')
-rw-r--r--Tests/BundleUtilities/testbundleutils3.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/Tests/BundleUtilities/testbundleutils3.cpp b/Tests/BundleUtilities/testbundleutils3.cpp
new file mode 100644
index 0000000..9df13e9
--- /dev/null
+++ b/Tests/BundleUtilities/testbundleutils3.cpp
@@ -0,0 +1,33 @@
+
+#include "framework.h"
+#include "shared.h"
+#include "stdio.h"
+
+#if defined(WIN32)
+#include <windows.h>
+#else
+#include "dlfcn.h"
+#endif
+
+int main(int, char**)
+{
+ framework();
+ shared();
+
+#if defined(WIN32)
+ HANDLE lib = LoadLibraryA("module3.dll");
+ if(!lib)
+ {
+ printf("Failed to open module3\n");
+ }
+#else
+ void* lib = dlopen("module3.so", RTLD_LAZY);
+ if(!lib)
+ {
+ printf("Failed to open module3\n%s\n", dlerror());
+ }
+#endif
+
+
+ return lib == 0 ? 1 : 0;
+}