Add the resource directory option to the json converter
This commit is contained in:
@@ -41,14 +41,18 @@
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
if (argc != 2)
|
||||
if (argc < 2)
|
||||
{
|
||||
std::cerr << "Must specify a simulation json as single argument.\n";
|
||||
return -1;
|
||||
}
|
||||
|
||||
std::string pathToJson = argv[1];
|
||||
auto configuration = DRAMSys::Config::from_path(pathToJson);
|
||||
std::string resourceDirectory = argc <= 2 ? DRAMSYS_RESOURCE_DIR : argv[2];
|
||||
|
||||
auto configuration = DRAMSys::Config::from_path(pathToJson, resourceDirectory);
|
||||
|
||||
|
||||
nlohmann::json json;
|
||||
json["simulation"] = configuration;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user