diff --git a/src/main.cpp b/src/main.cpp index 98ae069..5fbe53f 100644 --- a/src/main.cpp +++ b/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) + } \ No newline at end of file