This commit is contained in:
Zengtudor 2024-08-15 18:30:22 +08:00
parent daf3d5003c
commit 49c808fe9a
1 changed files with 11 additions and 4 deletions

View File

@ -15,15 +15,22 @@ int main(int argc, char* argv[]) {
LOG("arg[0]")
LOG(argv[0])
AS_EQ(argc,2)
std::filesystem::path p(argv[1]);
if (!p.is_absolute()) {
std::filesystem::path jsonPath(argv[1]);
if (!jsonPath.is_absolute()) {
LOG("The path is not absolute, changing it")
p = std::filesystem::current_path()/p;
jsonPath = std::filesystem::current_path()/jsonPath;
}
LOG("getting json files current dir")
LOG(p.string())
LOG(jsonPath)
LOG("getting project path")
const auto projectPath = jsonPath.parent_path();
LOG(projectPath)
LOG("will use g++ compiler")
LOG("checking g++ compiler version")
int sys_ret = system("g++ --version");
AS_EM(sys_ret,0,"get g++ --version failed")
const auto buildDir = projectPath / "build";
LOG("getting build dir")
LOG(buildDir)
}