Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
env:
# Bumped to 0.0.78: carries L3 build.mcpp native build program (build-mcpp member),
# compat.openblas Windows recipe (bin/libopenblas.dll staged beside the .exe).
MCPP_VERSION: "0.0.79"
MCPP_VERSION: "0.0.81"

jobs:
lint:
Expand Down Expand Up @@ -111,20 +111,20 @@ jobs:
include:
- platform: linux
os: ubuntu-latest
archive: mcpp-0.0.79-linux-x86_64.tar.gz
root: mcpp-0.0.79-linux-x86_64
archive: mcpp-0.0.81-linux-x86_64.tar.gz
root: mcpp-0.0.81-linux-x86_64
mcpp: bin/mcpp
xlings: registry/bin/xlings
- platform: macos
os: macos-15
archive: mcpp-0.0.79-macosx-arm64.tar.gz
root: mcpp-0.0.79-macosx-arm64
archive: mcpp-0.0.81-macosx-arm64.tar.gz
root: mcpp-0.0.81-macosx-arm64
mcpp: bin/mcpp
xlings: registry/bin/xlings
- platform: windows
os: windows-latest
archive: mcpp-0.0.79-windows-x86_64.zip
root: mcpp-0.0.79-windows-x86_64
archive: mcpp-0.0.81-windows-x86_64.zip
root: mcpp-0.0.81-windows-x86_64
mcpp: bin/mcpp.exe
xlings: registry/bin/xlings.exe
steps:
Expand Down
12 changes: 6 additions & 6 deletions tests/examples/build-mcpp/build.mcpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Native build program: generate a source the test links + define a macro the
// test sees. mcpp compiles+runs this (cwd = project root) before the build.
// Modules-first build program: import mcpp; for the typed directive API. A textual
// #include is still fine for file I/O (only `import std;` is unnecessary).
#include <filesystem>
#include <fstream>
#include <cstdio>
import mcpp;
int main() {
std::filesystem::create_directories("src");
std::ofstream("src/generated.cpp") << "int answer() { return 42; }\n";
std::puts("mcpp:generated=src/generated.cpp");
std::puts("mcpp:cxxflag=-DBUILT_BY_BUILD_MCPP=1");
std::puts("mcpp:rerun-if-changed=build.mcpp");
mcpp::generated("src/generated.cpp");
mcpp::define("BUILT_BY_BUILD_MCPP"); // cfg= → -DBUILT_BY_BUILD_MCPP
mcpp::rerun_if_changed("build.mcpp");
return 0;
}
Loading