From 9448878a4a3080482f55027b3ccd26d4e64629d7 Mon Sep 17 00:00:00 2001 From: Mark Donszelmann Date: Thu, 4 Nov 2010 15:23:37 +0100 Subject: Added test for local aol.properties file --- src/it/it0023-local-aol-properties/aol.properties | 26 +++++++++ src/it/it0023-local-aol-properties/pom.xml | 68 ++++++++++++++++++++++ .../src/main/c/HelloWorldLib.c | 9 +++ .../src/main/include/HelloWorldLib.h | 9 +++ .../src/test/c/HelloWorldTest.c | 9 +++ 5 files changed, 121 insertions(+) create mode 100644 src/it/it0023-local-aol-properties/aol.properties create mode 100644 src/it/it0023-local-aol-properties/pom.xml create mode 100644 src/it/it0023-local-aol-properties/src/main/c/HelloWorldLib.c create mode 100644 src/it/it0023-local-aol-properties/src/main/include/HelloWorldLib.h create mode 100644 src/it/it0023-local-aol-properties/src/test/c/HelloWorldTest.c diff --git a/src/it/it0023-local-aol-properties/aol.properties b/src/it/it0023-local-aol-properties/aol.properties new file mode 100644 index 0000000..e82c0e6 --- /dev/null +++ b/src/it/it0023-local-aol-properties/aol.properties @@ -0,0 +1,26 @@ +# +# Override to switch on compiled fragment +# + +x86.Windows.msvc.c.defines=LOCAL_AOL +amd64.Windows.msvc.c.defines=LOCAL_AOL +x86.Windows.icl.c.defines=LOCAL_AOL +amd64.Windows.icl.c.defines=LOCAL_AOL +x86.Windows.gpp.c.defines=LOCAL_AOL + +i386.Linux.gpp.c.defines=LOCAL_AOL +i386.Linux.icc.c.defines=LOCAL_AOL +i386.Linux.icpc.c.defines=LOCAL_AOL +amd64.Linux.icpc.c.defines=LOCAL_AOL +i386.Linux.ecc.c.defines=LOCAL_AOL +i386.Linux.ecpc.c.defines=LOCAL_AOL +amd64.Linux.gpp.c.defines=LOCAL_AOL + +ppc.MacOSX.gpp.c.defines=LOCAL_AOL +i386.MacOSX.gpp.c.defines=LOCAL_AOL +x86_64.MacOSX.gpp.c.defines=LOCAL_AOL +x86_64.MacOSX.icc.c.defines=LOCAL_AOL +x86_64.MacOSX.icpc.c.defines=LOCAL_AOL + +sparc.SunOS.CC.c.defines=LOCAL_AOL + diff --git a/src/it/it0023-local-aol-properties/pom.xml b/src/it/it0023-local-aol-properties/pom.xml new file mode 100644 index 0000000..f74649d --- /dev/null +++ b/src/it/it0023-local-aol-properties/pom.xml @@ -0,0 +1,68 @@ + + + + + + 4.0.0 + + + org.apache.maven.its.nar + it-parent + 1.0-SNAPSHOT + ../it-parent/pom.xml + + + it0023-local-aol-properties + nar + + Maven NAR Shared Library with local AOL properties + 1.0-SNAPSHOT + + Simple shared library and test fileusing local AOL properties + + http://maven.apache.org/ + + + true + + + + install + + + maven-nar-plugin + true + + + + shared + + + + + HelloWorldTest + shared + + + + + + + diff --git a/src/it/it0023-local-aol-properties/src/main/c/HelloWorldLib.c b/src/it/it0023-local-aol-properties/src/main/c/HelloWorldLib.c new file mode 100644 index 0000000..8453004 --- /dev/null +++ b/src/it/it0023-local-aol-properties/src/main/c/HelloWorldLib.c @@ -0,0 +1,9 @@ +#include +#include "HelloWorldLib.h" + +#ifdef LOCAL_AOL +char* HelloWorldLib_sayHello() { + return "Hello NAR LIB World!"; +} +#endif + diff --git a/src/it/it0023-local-aol-properties/src/main/include/HelloWorldLib.h b/src/it/it0023-local-aol-properties/src/main/include/HelloWorldLib.h new file mode 100644 index 0000000..e801bec --- /dev/null +++ b/src/it/it0023-local-aol-properties/src/main/include/HelloWorldLib.h @@ -0,0 +1,9 @@ +#ifndef HelloWorldLib_H +#define HelloWorldLib_H + +#ifdef WIN32 +__declspec(dllexport) +#endif +extern char* HelloWorldLib_sayHello(); + +#endif diff --git a/src/it/it0023-local-aol-properties/src/test/c/HelloWorldTest.c b/src/it/it0023-local-aol-properties/src/test/c/HelloWorldTest.c new file mode 100644 index 0000000..4aa35d8 --- /dev/null +++ b/src/it/it0023-local-aol-properties/src/test/c/HelloWorldTest.c @@ -0,0 +1,9 @@ +#include +#include "HelloWorldLib.h" + +int main(int argc, char *argv[]) { + printf("%s\n", HelloWorldLib_sayHello()); + return 0; +} + + -- cgit v1.2.3