summaryrefslogtreecommitdiffhomepage
path: root/src/JSONManifestBuilder.cxx
diff options
context:
space:
mode:
authorAmlal <amlal@zka.com>2024-09-25 17:35:06 +0200
committerAmlal <amlal@zka.com>2024-09-25 17:35:06 +0200
commit0ef6bae1a2d7c8ed98103e24fa831f7d9b520ab7 (patch)
treed1aff537b31cde0dc7d041893502c7e13ff2c32f /src/JSONManifestBuilder.cxx
parentd70fc2f8547b3b5af352ee1d5dab2f5122215215 (diff)
WIP: Add initial TOML build support
- Set up basic structure for handling TOML files in the build process Signed-off-by: Amlal <amlal@zka.com>
Diffstat (limited to 'src/JSONManifestBuilder.cxx')
-rw-r--r--src/JSONManifestBuilder.cxx24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/JSONManifestBuilder.cxx b/src/JSONManifestBuilder.cxx
index d456bb7..b9e186d 100644
--- a/src/JSONManifestBuilder.cxx
+++ b/src/JSONManifestBuilder.cxx
@@ -1,22 +1,16 @@
-//
-// main.cpp
+// ============================================================= //
// btb
-//
-// Created by Amlal on 6/20/24.
-//
+// Copyright ZKA Technologies.
+// ============================================================= //
#include <JSONManifestBuilder.hxx>
-
#include <json.hxx>
-
#include <cstdlib>
#include <cstdio>
-
#include <iostream>
#include <fstream>
-#include <sstream>
-using json = nlohmann::json;
+using JSON = nlohmann::json;
/// @brief Builds a JSON target.
/// @param arg_sz filename size
@@ -45,12 +39,12 @@ bool JSONManifestBuilder::Build(int arg_sz, const char* arg_val)
return false;
}
- json buildme = json::parse(json_obj);
+ JSON buildme = JSON::parse(json_obj);
std::string compiler = buildme["compiler_path"].get<std::string>();
- json headerSearchPath = buildme["headers_path"];
- json sourceFiles = buildme["sources_path"];
+ JSON headerSearchPath = buildme["headers_path"];
+ JSON sourceFiles = buildme["sources_path"];
std::string cmdLine = compiler + " ";
@@ -64,14 +58,14 @@ bool JSONManifestBuilder::Build(int arg_sz, const char* arg_val)
cmdLine += "-I" + headers.get<std::string>() + " ";
}
- json macrosList = buildme["cpp_macros"];
+ JSON macrosList = buildme["cpp_macros"];
for (auto& macro : macrosList)
{
cmdLine += "-D" + macro.get<std::string>() + " ";
}
- json compilerFlags = buildme["compiler_flags"];
+ JSON compilerFlags = buildme["compiler_flags"];
for (auto& flag : compilerFlags)
{