Skip to content

Commit c4cfb4c

Browse files
committed
fix(cli): force cmake fallback for db and orm scripts
1 parent f36e659 commit c4cfb4c

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

src/commands/run/detail/ScriptProbe.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,27 @@ namespace vix::commands::RunCommand::detail
620620
if (out.usesCompiledDeps && !onlyVixIncludesAdded)
621621
out.compiledDepPaths.push_back(opt.cppFile.parent_path() / ".vix" / "deps");
622622

623+
const bool requiresFullBuildSystem =
624+
out.features.usesOrm ||
625+
out.features.usesDb ||
626+
out.features.usesMySql ||
627+
opt.withSqlite ||
628+
opt.withMySql;
629+
630+
if (requiresFullBuildSystem)
631+
{
632+
out.strategy = ScriptExecutionStrategy::CMakeFallback;
633+
out.fallbackReason = choose_fallback_reason(
634+
out.features,
635+
out.usesCompiledDeps,
636+
out.requiresCMakeTargets,
637+
unsupportedFlags);
638+
639+
out.canUseDirectCompile = false;
640+
out.shouldUseCMakeFallback = true;
641+
return out;
642+
}
643+
623644
const bool allowDirect =
624645
!unsupportedFlags &&
625646
(!out.usesCompiledDeps || onlyVixIncludesAdded) &&

0 commit comments

Comments
 (0)