import std; import Crafter.Build; namespace fs = std::filesystem; using namespace Crafter; // A pure library project: the root Configuration is the lib itself. Tests // are declared with cfg.AddTest — one line per test, with deps and other // options applied via the returned builder. extern "C" Configuration CrafterBuildProject(std::span) { Configuration cfg; cfg.path = "./mylib/"; cfg.name = "MyMath"; cfg.outputName = "MyMath"; cfg.target = "x86_64-pc-linux-gnu"; cfg.type = ConfigurationType::LibraryStatic; std::array ifaces = { "MyMath" }; std::array impls = {}; cfg.GetInterfacesAndImplementations(ifaces, impls); cfg.AddTest("Smoke"); cfg.AddTest("UnitMyMath").Dependencies({ &cfg }); return cfg; }