diff options
Diffstat (limited to 'test/ctor.cc')
-rw-r--r-- | test/ctor.cc | 64 |
1 files changed, 54 insertions, 10 deletions
diff --git a/test/ctor.cc b/test/ctor.cc index 6515c72..a2ad64d 100644 --- a/test/ctor.cc +++ b/test/ctor.cc @@ -1,16 +1,16 @@ // -*- c++ -*- // Distributed under the BSD 2-Clause License. // See accompanying file LICENSE for details. -#include <libctor.h> +#include <ctor.h> namespace { -BuildConfigurations ctorTestConfigs() +ctor::build_configurations ctorTestConfigs(const ctor::settings& settings) { return { { - .type = TargetType::UnitTest, + .type = ctor::target_type::unit_test, .target = "execute_test", .sources = { "execute_test.cc", @@ -19,7 +19,7 @@ BuildConfigurations ctorTestConfigs() }, .flags = { .cxxflags = { - "-std=c++20", "-O3", "-s", "-Wall", "-Werror", + "-std=c++20", "-O3", "-Wall", "-Werror", "-I../src", "-Iuunit", "-DOUTPUT=\"execute\"", }, @@ -27,16 +27,16 @@ BuildConfigurations ctorTestConfigs() }, }, { - .type = TargetType::UnitTest, + .type = ctor::target_type::unit_test, .target = "tasks_test", .sources = { "tasks_test.cc", "testmain.cc", }, - .depends = {"libctor.a"}, + .depends = { "libctor_nomain.a" }, .flags = { .cxxflags = { - "-std=c++20", "-O3", "-s", "-Wall", "-Werror", + "-std=c++20", "-O3", "-Wall", "-Werror", "-I../src", "-Iuunit", "-DOUTPUT=\"tasks\"", }, @@ -44,22 +44,66 @@ BuildConfigurations ctorTestConfigs() }, }, { - .type = TargetType::UnitTest, + .type = ctor::target_type::unit_test, .target = "source_type_test", .sources = { "source_type_test.cc", "testmain.cc", }, - .depends = {"libctor.a"}, + .depends = { "libctor_nomain.a" }, .flags = { .cxxflags = { - "-std=c++20", "-O3", "-s", "-Wall", "-Werror", + "-std=c++20", "-O3", "-Wall", "-Werror", "-I../src", "-Iuunit", "-DOUTPUT=\"source_type\"", }, .ldflags = { "-pthread" }, }, }, + { + .type = ctor::target_type::unit_test, + .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 = ctor::target_type::unit_test_library, + .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", "-Wall", "-Werror", + "-I../src", + }, + .ldflags = { "-pthread" }, + }, + }, }; } } |