diff options
Diffstat (limited to 'test/ctor.cc')
-rw-r--r-- | test/ctor.cc | 91 |
1 files changed, 79 insertions, 12 deletions
diff --git a/test/ctor.cc b/test/ctor.cc index 8080d61..9b690a2 100644 --- a/test/ctor.cc +++ b/test/ctor.cc @@ -5,7 +5,7 @@ namespace { -BuildConfigurations ctorTestConfigs() +BuildConfigurations ctorTestConfigs(const Settings& settings) { return { @@ -14,13 +14,16 @@ BuildConfigurations ctorTestConfigs() .target = "execute_test", .sources = { "execute_test.cc", - "uunit/uunit.cc", + "testmain.cc", "../src/execute.cc", }, - .cxxflags = { - "-std=c++17", "-O3", "-s", "-Wall", "-Werror", - "-I../src", "-Iuunit", - "-DOUTPUT=\"execute\"", + .flags = { + .cxxflags = { + "-std=c++20", "-O3", "-s", "-Wall", "-Werror", + "-I../src", "-Iuunit", + "-DOUTPUT=\"execute\"", + }, + .ldflags = { "-pthread" }, }, }, { @@ -28,13 +31,77 @@ BuildConfigurations ctorTestConfigs() .target = "tasks_test", .sources = { "tasks_test.cc", - "uunit/uunit.cc", + "testmain.cc", }, - .depends = {"libctor.a"}, - .cxxflags = { - "-std=c++17", "-O3", "-s", "-Wall", "-Werror", - "-I../src", "-Iuunit", - "-DOUTPUT=\"tasks\"", + .depends = { "libctor_nomain.a" }, + .flags = { + .cxxflags = { + "-std=c++20", "-O3", "-s", "-Wall", "-Werror", + "-I../src", "-Iuunit", + "-DOUTPUT=\"tasks\"", + }, + .ldflags = { "-pthread" }, + }, + }, + { + .type = TargetType::UnitTest, + .target = "source_type_test", + .sources = { + "source_type_test.cc", + "testmain.cc", + }, + .depends = { "libctor_nomain.a" }, + .flags = { + .cxxflags = { + "-std=c++20", "-O3", "-s", "-Wall", "-Werror", + "-I../src", "-Iuunit", + "-DOUTPUT=\"source_type\"", + }, + .ldflags = { "-pthread" }, + }, + }, + { + .type = TargetType::UnitTest, + .target = "tools_test", + .sources = { + "tools_test.cc", + "testmain.cc", + "../src/tools.cc", + }, + //.depends = { "libctor_nomain.a" }, + .flags = { + .cxxflags = { + "-std=c++20", "-O3", "-Wall", "-Werror", + "-I../src", "-Iuunit", + "-DOUTPUT=\"tools\"", + }, + }, + }, + { + .type = TargetType::UnitTestLib, + .target = "libctor_nomain.a", + .sources = { + "../src/build.cc", + "../src/configure.cc", + "../src/execute.cc", + "../src/rebuild.cc", + "../src/tasks.cc", + "../src/task.cc", + "../src/task_ar.cc", + "../src/task_cc.cc", + "../src/task_fn.cc", + "../src/task_ld.cc", + "../src/task_so.cc", + "../src/tools.cc", + "../src/util.cc", + "../src/externals_manual.cc", + }, + .flags = { + .cxxflags = { + "-std=c++20", "-O3", "-s", "-Wall", "-Werror", + "-I../src", + }, + .ldflags = { "-pthread" }, }, }, }; |