This commit is contained in:
parent
dea9b63ed2
commit
e684882cb8
7 changed files with 367 additions and 166 deletions
|
|
@ -57,6 +57,8 @@ namespace Crafter {
|
|||
}
|
||||
if(config.contains("standard")) {
|
||||
standard = config["standard"].get<std::string>();
|
||||
} else {
|
||||
standard = "c++26";
|
||||
}
|
||||
if(config.contains("target")) {
|
||||
target = config["target"].get<std::string>();
|
||||
|
|
@ -81,6 +83,8 @@ namespace Crafter {
|
|||
}
|
||||
if(config.contains("march")) {
|
||||
march = config["march"].get<std::string>();
|
||||
} else {
|
||||
march = "native";
|
||||
}
|
||||
if(config.contains("libs")) {
|
||||
for (auto it : config["libs"]) {
|
||||
|
|
@ -263,13 +267,7 @@ namespace Crafter {
|
|||
// depFolder += it["branch"].get<std::string>();
|
||||
// }
|
||||
|
||||
char self[PATH_MAX];
|
||||
ssize_t count = readlink("/proc/self/exe", self, PATH_MAX);
|
||||
if (count == -1) {
|
||||
throw std::runtime_error("Failed to get executable path");
|
||||
}
|
||||
self[count] = '\0';
|
||||
const fs::path cacheDir = (fs::path(self).parent_path().parent_path() / "cloneCache").string();
|
||||
const fs::path cacheDir = GetPath() / "cloneCache";
|
||||
|
||||
if (!fs::exists(cacheDir)) {
|
||||
fs::create_directories(cacheDir);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue