Crafter.Build/tests/DuplicateModule/fixture/m/project.cpp

22 lines
797 B
C++
Raw Permalink Normal View History

// SPDX-License-Identifier: LGPL-3.0-only
// SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
import std;
import Crafter.Build;
namespace fs = std::filesystem;
using namespace Crafter;
// --wide is this project's own flag, and it changes what M declares.
extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> args) {
Configuration cfg;
cfg.path = "./";
cfg.name = "M";
cfg.outputName = "M";
cfg.type = ConfigurationType::LibraryStatic;
ApplyStandardArgs(cfg, args);
if (std::ranges::contains(args, std::string_view("--wide"))) cfg.compileFlags.push_back("-DWIDE");
std::array<fs::path, 1> ifaces = { "interfaces/M" };
std::array<fs::path, 0> impls = {};
cfg.GetInterfacesAndImplementations(ifaces, impls);
return cfg;
}