update
This commit is contained in:
parent
daf3d5003c
commit
49c808fe9a
15
src/main.cpp
15
src/main.cpp
@ -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)
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user