From bb85fab65f3acf93f03d98c6489b6bb238fc0eac Mon Sep 17 00:00:00 2001 From: karl Date: Tue, 16 Mar 2021 14:55:54 +0100 Subject: [PATCH] Restructure to engine library with test executables --- SConstruct | 9 +++++++-- cpp/Logger.cpp | 0 cpp/Logger.os | Bin 0 -> 1072 bytes include/Logger.h | 0 Vector.h => include/Vector.h | 0 .../catch_amalgamated.cpp | 0 .../catch_amalgamated.hpp | 0 test.cpp => test/vector-test.cpp | 2 +- 8 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 cpp/Logger.cpp create mode 100644 cpp/Logger.os create mode 100644 include/Logger.h rename Vector.h => include/Vector.h (100%) rename catch_amalgamated.cpp => test/catch_amalgamated.cpp (100%) rename catch_amalgamated.hpp => test/catch_amalgamated.hpp (100%) rename test.cpp => test/vector-test.cpp (99%) diff --git a/SConstruct b/SConstruct index cb82381..c355fee 100644 --- a/SConstruct +++ b/SConstruct @@ -5,6 +5,11 @@ env = DefaultEnvironment(tools=['default', 'compilation_db']) env.CompilationDatabase() env.Append(CCFLAGS=["-Wall", "-Wextra", "-Werror", "-pedantic"]) +env.Append(CPPPATH=['.', 'include']) -# Build the output program -Program('vector.out', Glob('*.cpp')) +# Build the test programs +catch_cpp = "test/catch_amalgamated.cpp" +Program('vector-test.out', [catch_cpp, 'test/vector-test.cpp']) + +# Build the library +SharedLibrary('ged', Glob('cpp/*.cpp')) diff --git a/cpp/Logger.cpp b/cpp/Logger.cpp new file mode 100644 index 0000000..e69de29 diff --git a/cpp/Logger.os b/cpp/Logger.os new file mode 100644 index 0000000000000000000000000000000000000000..38f0a053e6c6341b6351c108bcea77faa38e3990 GIT binary patch literal 1072 zcmbVL%}T>S5T11FFCO$Jc!?(!?2;&6JV>C_dMKVOcuitRLGnYg0ekZ5%EqYFyuw zSJE5#*G-%I7mNT5QFDmCg+6_p!vJ7Km_Yx}XxSlrefM!h?@p;FcJDE2IxjQO7@J0`qr-Qx!BP`f=PuwRaK5HRITmJ(U4md~v literal 0 HcmV?d00001 diff --git a/include/Logger.h b/include/Logger.h new file mode 100644 index 0000000..e69de29 diff --git a/Vector.h b/include/Vector.h similarity index 100% rename from Vector.h rename to include/Vector.h diff --git a/catch_amalgamated.cpp b/test/catch_amalgamated.cpp similarity index 100% rename from catch_amalgamated.cpp rename to test/catch_amalgamated.cpp diff --git a/catch_amalgamated.hpp b/test/catch_amalgamated.hpp similarity index 100% rename from catch_amalgamated.hpp rename to test/catch_amalgamated.hpp diff --git a/test.cpp b/test/vector-test.cpp similarity index 99% rename from test.cpp rename to test/vector-test.cpp index c996635..fd2fd41 100644 --- a/test.cpp +++ b/test/vector-test.cpp @@ -377,4 +377,4 @@ SCENARIO("Constructors and Destructors are called as expected", "[vector]") { } } } -} \ No newline at end of file +}