diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/COnly/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/COnly/conly.c | 5 | ||||
-rw-r--r-- | Tests/COnly/foo.c | 1 | ||||
-rw-r--r-- | Tests/COnly/foo.h | 1 |
4 files changed, 8 insertions, 1 deletions
diff --git a/Tests/COnly/CMakeLists.txt b/Tests/COnly/CMakeLists.txt index 1eaeb84..f9a6813 100644 --- a/Tests/COnly/CMakeLists.txt +++ b/Tests/COnly/CMakeLists.txt @@ -1,3 +1,3 @@ # a simple C only test case PROJECT (conly C) -ADD_EXECUTABLE (conly conly.c) +ADD_EXECUTABLE (conly conly.c foo.c foo.h) diff --git a/Tests/COnly/conly.c b/Tests/COnly/conly.c index 1482f27..3f720ef 100644 --- a/Tests/COnly/conly.c +++ b/Tests/COnly/conly.c @@ -1,4 +1,9 @@ +#include "foo.h" + +#include <stdio.h> + int main () { + printf("Foo: %s\n", foo); return 0; } diff --git a/Tests/COnly/foo.c b/Tests/COnly/foo.c new file mode 100644 index 0000000..b42bbfd --- /dev/null +++ b/Tests/COnly/foo.c @@ -0,0 +1 @@ +const char* foo = "Foo"; diff --git a/Tests/COnly/foo.h b/Tests/COnly/foo.h new file mode 100644 index 0000000..67c42a20 --- /dev/null +++ b/Tests/COnly/foo.h @@ -0,0 +1 @@ +extern const char* foo; |