diff --git a/build.cpp b/build.cpp index 78ce995..38c5f9a 100644 --- a/build.cpp +++ b/build.cpp @@ -33,6 +33,16 @@ void build(Void::Build::Project &project) { .link_option("-ldl", Void::Build::Visibility::Public); } + // Install/packaging rules: module archives, public headers and license metadata. + for (auto &[name, target] : libs.modules) { + if (target.record().kind == Void::Build::TargetKind::HeaderOnly) { + continue; + } + target.install("lib"); + } + project.install_directory("include", "include"); + project.install_file("README.md", "share/doc/VoidLibrary"); + // Smoke test exercising the native VoidLibrary closure through VBS. auto smoke = project.test("void_smoke"); smoke.cxx_standard(Void::Build::CxxStandard::Cxx26) diff --git a/build.profiles.cpp b/build.profiles.cpp new file mode 100644 index 0000000..1564dcc --- /dev/null +++ b/build.profiles.cpp @@ -0,0 +1,8 @@ +#include + +// VoidLibrary native profiles: debug (default) and release, plus an optimized +// "relwithdebinfo" variant useful for sanitizer and benchmark runs. +void profiles(Void::Build::Profiles &descriptions) { + descriptions = Void::Build::default_profiles(); + descriptions.add("relwithdebinfo", {"-O2", "-g"}); +}