// -*- c++ -*- // Distributed under the BSD 2-Clause License. // See accompanying file LICENSE for details. #include namespace { BuildConfigurations ctorTestConfigs(const Settings& settings) { return { { .type = TargetType::UnitTest, .target = "execute_test", .sources = { "execute_test.cc", "testmain.cc", "../src/execute.cc", }, .flags = { .cxxflags = { "/std:c++20", "/O2",// "/Wall",// "/WX", "/I../src", "/Iuunit", "/Isrc", "/Itest/uunit", "/DOUTPUT=\\\"execute\\\"", "/nologo", "/EHsc", "/D_X86_", }, //.ldflags = { "/pthread" }, .ldflags = { "/nologo" }, }, }, { .type = TargetType::UnitTest, .target = "tasks_test", .sources = { "tasks_test.cc", "testmain.cc", }, .depends = { "libctor_nomain.lib" }, .flags = { .cxxflags = { "/std:c++20", "/O2",// "/Wall",// "/WX", "/I../src", "/Iuunit", "/Isrc", "/Itest/uunit", "/DOUTPUT=\\\"tasks\\\"", "/nologo", "/EHsc", "/D_X86_", }, //.ldflags = { "/pthread" }, .ldflags = { "/nologo" }, }, }, { .type = TargetType::UnitTest, .target = "source_type_test", .sources = { "source_type_test.cc", "testmain.cc", }, .depends = { "libctor_nomain.lib" }, .flags = { .cxxflags = { "/std:c++20", "/O2",// "/Wall",// "/WX", "/I../src", "/Iuunit", "/Isrc", "/Itest/uunit", "/DOUTPUT=\\\"source_type\\\"", "/nologo", "/EHsc", "/D_X86_", }, //.ldflags = { "/pthread" }, .ldflags = { "/nologo" }, }, }, { .type = TargetType::UnitTest, .target = "tools_test", .sources = { "tools_test.cc", "testmain.cc", "../src/tools.cc", }, //.depends = { "libctor_nomain.a" }, .flags = { .cxxflags = { "/std:c++20", "/O2",// "/Wall",// "/WX", "/I../src", "/Iuunit", "/Isrc", "/Itest/uunit", "/DOUTPUT=\\\"tools\\\"", "/nologo", "/EHsc", "/D_X86_", }, .ldflags = { "/nologo" }, }, }, { .type = TargetType::UnitTestLib, .target = "libctor_nomain.lib", .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", "../getopt-for-windows/getopt.c", }, .flags = { .cxxflags = { "/std:c++20", "/O2",// "/Wall",// "/WX", "/I../src", "/Isrc", "/nologo", "/EHsc", "/D_X86_", "/Igetopt-for-windows", }, .cflags = { //"/std:c++20", "/O2",// "/Wall",// "/WX", "/I../src", "/Isrc", "/nologo", "/EHsc", "/D_X86_", "/Igetopt-for-windows", }, //.ldflags = { "/pthread" }, .ldflags = { "/nologo" }, }, }, }; } } // Convenience macro REG(ctorTestConfigs);