This commit is contained in:
parent
379e5c2028
commit
dea9b63ed2
2 changed files with 10 additions and 2 deletions
|
|
@ -27,6 +27,7 @@ import :Project;
|
|||
//import :Dependency;
|
||||
import :Shader;
|
||||
import :Module;
|
||||
import :Command;
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
|
|
@ -59,6 +60,9 @@ namespace Crafter {
|
|||
}
|
||||
if(config.contains("target")) {
|
||||
target = config["target"].get<std::string>();
|
||||
} else {
|
||||
target = RunCommand("clang -print-target-triple");
|
||||
target.pop_back();
|
||||
}
|
||||
if(config.contains("debug")) {
|
||||
debug = config["debug"].get<bool>();
|
||||
|
|
@ -267,6 +271,10 @@ namespace Crafter {
|
|||
self[count] = '\0';
|
||||
const fs::path cacheDir = (fs::path(self).parent_path().parent_path() / "cloneCache").string();
|
||||
|
||||
if (!fs::exists(cacheDir)) {
|
||||
fs::create_directories(cacheDir);
|
||||
}
|
||||
|
||||
if (!fs::exists(cacheDir/depFolder)) {
|
||||
std::string cloneCommand = std::format("cd {} && git clone {} && cd {}", cacheDir.string(), path.string(), depFolder);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue