summaryrefslogtreecommitdiff
path: root/tests/c_shared_library
diff options
context:
space:
mode:
authorruki <[email protected]>2016-02-22 08:49:20 +0800
committerruki <[email protected]>2016-02-22 08:49:20 +0800
commitec6fd4eeca3fa468cffb25b472eb349c1fed06aa (patch)
tree3dbbb42e44310d8ae80ba2361a9f34bbbb90da13 /tests/c_shared_library
parent762f3cd87615acbed339931bfb56c2b75c44cfa0 (diff)
modify tests script
Diffstat (limited to 'tests/c_shared_library')
-rwxr-xr-xtests/c_shared_library/src/interface.c6
-rwxr-xr-xtests/c_shared_library/src/interface.cpp6
-rwxr-xr-xtests/c_shared_library/src/interface.h24
-rwxr-xr-xtests/c_shared_library/src/test.c8
-rwxr-xr-xtests/c_shared_library/src/test.cpp10
-rwxr-xr-xtests/c_shared_library/xmake.lua50
6 files changed, 0 insertions, 104 deletions
diff --git a/tests/c_shared_library/src/interface.c b/tests/c_shared_library/src/interface.c
deleted file mode 100755
index 598d07560..000000000
--- a/tests/c_shared_library/src/interface.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "interface.h"
-
-int add(int a, int b)
-{
- return a + b;
-}
diff --git a/tests/c_shared_library/src/interface.cpp b/tests/c_shared_library/src/interface.cpp
deleted file mode 100755
index 598d07560..000000000
--- a/tests/c_shared_library/src/interface.cpp
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "interface.h"
-
-int add(int a, int b)
-{
- return a + b;
-}
diff --git a/tests/c_shared_library/src/interface.h b/tests/c_shared_library/src/interface.h
deleted file mode 100755
index ef24ba3ce..000000000
--- a/tests/c_shared_library/src/interface.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if defined(_WIN32)
-# define __export __declspec(dllexport)
-#elif defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
-# define __export __attribute__((visibility("default")))
-#else
-# define __export
-#endif
-
-/*! calculate add(a, b)
- *
- * @param a the first argument
- * @param b the second argument
- *
- * @return the result
- */
-__export int add(int a, int b);
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/tests/c_shared_library/src/test.c b/tests/c_shared_library/src/test.c
deleted file mode 100755
index 9505a2f75..000000000
--- a/tests/c_shared_library/src/test.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "interface.h"
-#include <stdio.h>
-
-int main(int argc, char** argv)
-{
- printf("add(1, 2) = %d\n", add(1, 2));
- return 0;
-}
diff --git a/tests/c_shared_library/src/test.cpp b/tests/c_shared_library/src/test.cpp
deleted file mode 100755
index 72e03272b..000000000
--- a/tests/c_shared_library/src/test.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "interface.h"
-#include <iostream>
-
-using namespace std;
-
-int main(int argc, char** argv)
-{
- cout << "add(1, 2) = " << add(1, 2) << endl;
- return 0;
-}
diff --git a/tests/c_shared_library/xmake.lua b/tests/c_shared_library/xmake.lua
deleted file mode 100755
index d357b72f3..000000000
--- a/tests/c_shared_library/xmake.lua
+++ /dev/null
@@ -1,50 +0,0 @@
--- the debug mode
-if is_mode("debug") then
-
- -- enable the debug symbols
- set_symbols("debug")
-
- -- disable optimization
- set_optimize("none")
-end
-
--- the release mode
-if is_mode("release") then
-
- -- set the symbols visibility: hidden
- set_symbols("hidden")
-
- -- enable fastest optimization
- set_optimize("fastest")
-
- -- strip all symbols
- set_strip("all")
-end
-
--- add target
-target("c_shared_library")
-
- -- set kind
- set_kind("shared")
-
- -- add files
- add_files("src/interface.cpp")
-
--- add target
-target("test")
-
- -- set kind
- set_kind("binary")
-
- -- add deps
- add_deps("c_shared_library")
-
- -- add files
- add_files("src/test.cpp")
-
- -- add links
- add_links("c_shared_library")
-
- -- add link directory
- add_linkdirs("$(buildir)")
-