summaryrefslogtreecommitdiffhomepage
path: root/src/lib/JSONManifestBuilder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/JSONManifestBuilder.cc')
-rw-r--r--src/lib/JSONManifestBuilder.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/JSONManifestBuilder.cc b/src/lib/JSONManifestBuilder.cc
index 9de6608..c6ff4d8 100644
--- a/src/lib/JSONManifestBuilder.cc
+++ b/src/lib/JSONManifestBuilder.cc
@@ -4,6 +4,8 @@
// ============================================================= //
#include <NeBuildKit/JSONManifestBuilder.h>
+#include <json/json.h>
+#include <fstream>
using namespace NeBuild;
using namespace nlohmann;
@@ -18,14 +20,14 @@ namespace FS = std::filesystem;
/// @retval true building has succeeded.
/// @retval false fail to build, see error message.
/// =========================================================== ///
-bool JSONManifestBuilder::BuildTarget(const std::string& argv_val, const bool dry_run) {
+bool JSONManifestBuilder::BuildTarget(BuildConfig& config) {
std::string path;
- if (argv_val.empty()) {
+ if (config.path_.empty()) {
NeBuild::Logger::info() << "nebuild: error: file path is empty" << std::endl;
return false;
} else {
- path = argv_val;
+ path = config.path_;
if (!FS::exists(path)) {
NeBuild::Logger::info() << "nebuild: error: file '" << path << "' does not exist"