fixed recursive libs
Some checks failed
demo.yaml / fixed recursive libs (push) Failing after 0s

This commit is contained in:
Jorijn van der Graaf 2025-11-16 18:44:41 +01:00
commit 0819baf6d3
8 changed files with 170 additions and 117 deletions

View file

@ -66,19 +66,18 @@ int main(int argc, char* argv[]) {
projectPath = filepath;
}
Project project = Project::LoadFromJSON(projectPath);
Project project(std::move(projectPath));
if(command == "build") {
std::tuple<Configuration&, BuildResult> config = project.Build(argument);
std::cout << "amogus" << std::endl;
if(std::get<1>(config).errors.empty()) {
if(run){
std::string binDir = std::format("{}/{}", project.binDir.string(), std::get<0>(config).name);
if(std::get<0>(config).debug) {
system(std::format("cd {} && ./{}", (fs::path(projectPath).parent_path()/binDir).string(), project.name).c_str());
system(std::format("cd {} && ./{}", (project.path.parent_path()/binDir).string(), project.name).c_str());
//system(std::format("cd {} && lldb -o run {}", (fs::path(projectPath).parent_path()/binDir).string(), project.name).c_str());
} else {
system(std::format("cd {} && ./{}", (fs::path(projectPath).parent_path()/binDir).string(), project.name).c_str());
system(std::format("cd {} && ./{}", (project.path.parent_path()/binDir).string(), project.name).c_str());
}
}
} else {