-/* Copyright (c) 2009-2023. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2009-2023. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "dax_dtd.h"
#include "dax_dtd.c"
+#if SIMGRID_HAVE_JSON
#include <nlohmann/json.hpp>
+#endif
#if HAVE_GRAPHVIZ
#include <graphviz/cgraph.h>
*/
std::vector<ActivityPtr> create_DAG_from_json(const std::string& filename)
{
+#if SIMGRID_HAVE_JSON
std::ifstream f(filename);
auto data = nlohmann::json::parse(f);
std::vector<ActivityPtr> dag = {};
activity->start();
}
return dag;
+#else
+ xbt_die("JSON support was not compiled in, probably because nlohmann/json was not found. Please install "
+ "nlohmann-json3-dev and recompile SimGrid to use this feature.");
+#endif
}
-
/** @brief loads a DAX file describing a DAG
*
* See https://confluence.pegasus.isi.edu/display/pegasus/WorkflowGenerator for more details.