summaryrefslogtreecommitdiff
path: root/Tests/BundleUtilities/testbundleutils3.cpp
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-10-30 15:39:57 -0700
committerAnas Nashif <anas.nashif@intel.com>2012-10-30 15:39:57 -0700
commit035c7fabc3b82cbc9a346c11abe2e9462b4c0379 (patch)
tree7e40f5a790eae329a8c5d3e59f046451767956ff /Tests/BundleUtilities/testbundleutils3.cpp
downloadcmake-035c7fabc3b82cbc9a346c11abe2e9462b4c0379.tar.gz
cmake-035c7fabc3b82cbc9a346c11abe2e9462b4c0379.tar.bz2
cmake-035c7fabc3b82cbc9a346c11abe2e9462b4c0379.zip
Imported Upstream version 2.8.9upstream/2.8.9
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 000000000..9df13e988
--- /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;
+}