Skip to content

Commit 576e8f9

Browse files
committed
fix(build-program): the program's directory is made beside its per-configuration output; e2e 111 reads the new place
1 parent 0856e8a commit 576e8f9

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

‎src/build/build_program.cppm‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,10 @@ std::expected<void, std::string> run_build_program_impl(
14971497
// the program's turn comes.
14981498
if (mode == ProgramMode::Compile) programReport.reported = true;
14991499

1500-
fs::create_directories(outDir, ec); // creates bdir too
1500+
// Both: the output directory is per configuration and need not lie
1501+
// below `bdir`, where the program binary and its cache are (D7).
1502+
fs::create_directories(bdir, ec);
1503+
fs::create_directories(outDir, ec);
15011504
// #230: on Windows the capture_exec shell is cmd.exe, which can only launch
15021505
// a PE by an executable extension — a bare `.bin` is not in PATHEXT and
15031506
// fails to run. Name the compiled program `.exe` there; other platforms keep

‎tests/e2e/111_dep_build_mcpp.sh‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,9 @@ after="$(find "$TMP/deplib" | sort)"
8080
diff <(echo "$before") <(echo "$after") || true
8181
echo "dependency root was written to"; exit 1; }
8282

83-
# Artifacts live in the consuming project.
84-
find target/.build-mcpp/deps -name 'gen_dep.cpp' | grep -q . || {
83+
# Artifacts live in the consuming project: the program in .build-mcpp/deps,
84+
# its output in this configuration's directory (mcpp 2026.10.10.1+).
85+
find target/.build-mcpp/out -path '*deplib/gen_dep.cpp' | grep -q . || {
8586
echo "dep OUT_DIR generated file not in project tree"; exit 1; }
8687

8788
echo "OK"

0 commit comments

Comments
 (0)