This commit is contained in:
parent
0819baf6d3
commit
74f0f19b4a
2 changed files with 49 additions and 24 deletions
|
|
@ -43,14 +43,14 @@ namespace Crafter {
|
|||
nlohmann::json testJson = data["tests"];
|
||||
|
||||
if(data.contains("bin_dir")) {
|
||||
binDir = data["bin_dir"].get<std::string>();
|
||||
binDir = this->path/data["bin_dir"].get<std::string>();
|
||||
} else {
|
||||
binDir = "bin";
|
||||
binDir = this->path/"bin";
|
||||
}
|
||||
if(data.contains("build_dir")) {
|
||||
buildDir = data["build_dir"].get<std::string>();
|
||||
buildDir = this->path/data["build_dir"].get<std::string>();
|
||||
} else {
|
||||
buildDir = "build";
|
||||
buildDir = this->path/"build";
|
||||
}
|
||||
|
||||
if (!fs::exists(binDir)) {
|
||||
|
|
@ -224,7 +224,11 @@ namespace Crafter {
|
|||
command += std::format(" -std=c++26");
|
||||
}
|
||||
for(const Define& define : config.defines) {
|
||||
command += std::format(" -D {}={}", define.name, define.value);
|
||||
if(define.value.empty()) {
|
||||
command += std::format(" -D {}", define.name);
|
||||
} else {
|
||||
command += std::format(" -D {}={}", define.name, define.value);
|
||||
}
|
||||
}
|
||||
|
||||
fs::path pcmDir;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue