This commit is contained in:
Zengtudor 2024-08-12 15:45:21 +08:00
parent 75d224d735
commit 3522d452f1
2 changed files with 19 additions and 5 deletions

View File

@ -31,10 +31,14 @@ export default class CppBuilder implements Builder{
printDebug(command) printDebug(command)
}) })
}); });
(await Promise.all(tasks)).forEach(e=>{ try{
printDebug(`stdout:${e.stdout}`) (await Promise.all(tasks)).forEach(e=>{
if(e.stderr){printErrorOrDebug(`stderr:${e.stderr}`)} printDebug(`stdout:${e.stdout}`)
}) if(e.stderr){printErrorOrDebug(`stderr:${e.stderr}`)}
})
}catch(e:any){
printErrorOrDebug(e.message)
}
} }
link = async()=>{ link = async()=>{
printDebug("linking") printDebug("linking")

View File

@ -4,5 +4,15 @@ import { addProject } from "../../src/Tools/AddProject.js";
// const compiler = new GppCompiler() // const compiler = new GppCompiler()
addProject(()=>{ addProject(()=>{
return new CppProject("hello").addFiles("main.cpp") const project = new CppProject("hello").addFiles("./hello/main.cpp")
project.optimize="fastest"
// console.log(project.compiler.compilerVersion)
return project
})
addProject(()=>{
const project = new CppProject("world")
project.addFiles("./world/world.cpp")
project.optimize="fastest"
return project
}) })