diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/JSONManifestBuilder.cc | 11 | ||||
| -rw-r--r-- | src/lib/TOMLManifestBuilder.cc | 10 |
2 files changed, 12 insertions, 9 deletions
diff --git a/src/lib/JSONManifestBuilder.cc b/src/lib/JSONManifestBuilder.cc index c6ff4d8..af69176 100644 --- a/src/lib/JSONManifestBuilder.cc +++ b/src/lib/JSONManifestBuilder.cc @@ -7,10 +7,8 @@ #include <json/json.h> #include <fstream> -using namespace NeBuild; -using namespace nlohmann; - -using JSON = json; +namespace NeBuild { +using JSON = nlohmann::json; namespace FS = std::filesystem; /// =========================================================== /// @@ -95,10 +93,12 @@ bool JSONManifestBuilder::BuildTarget(BuildConfig& config) { if (ret_exec > 0) { NeBuild::Logger::info() << "error: exit with message: " << std::strerror(ret_exec) << "" << std::endl; + config.has_failed_ = true; return false; } } catch (std::runtime_error& err) { NeBuild::Logger::info() << "error: exit with message: " << err.what() << "" << std::endl; + config.has_failed_ = true; return false; } @@ -108,6 +108,7 @@ bool JSONManifestBuilder::BuildTarget(BuildConfig& config) { /// =========================================================== /// /// @brief Returns the build system name. /// =========================================================== /// -const char* JSONManifestBuilder::BuildSystem() { +const std::string_view JSONManifestBuilder::BuildSystem() { return "NeBuild (JSON)"; } +} // namespace NeBuild
\ No newline at end of file diff --git a/src/lib/TOMLManifestBuilder.cc b/src/lib/TOMLManifestBuilder.cc index a58b280..5b759fc 100644 --- a/src/lib/TOMLManifestBuilder.cc +++ b/src/lib/TOMLManifestBuilder.cc @@ -4,11 +4,10 @@ // ============================================================= // #include <NeBuildKit/TOMLManifestBuilder.h> -#include <toml++/toml.hpp> #include <filesystem> +#include <toml++/toml.hpp> -using namespace NeBuild; - +namespace NeBuild { namespace FS = std::filesystem; /// =========================================================== /// @@ -98,10 +97,12 @@ bool TOMLManifestBuilder::BuildTarget(BuildConfig& config) { if (ret_exec > 0) { NeBuild::Logger::info() << "error: exit with message: " << std::strerror(ret_exec) << "" << std::endl; + config.has_failed_ = true; return false; } } catch (std::runtime_error& err) { NeBuild::Logger::info() << "error: exit with message: " << err.what() << "" << std::endl; + config.has_failed_ = true; return false; } @@ -111,6 +112,7 @@ bool TOMLManifestBuilder::BuildTarget(BuildConfig& config) { /// =========================================================== /// /// @brief Returns the build system name. /// =========================================================== /// -const char* TOMLManifestBuilder::BuildSystem() { +const std::string_view TOMLManifestBuilder::BuildSystem() { return "NeBuild (TOML)"; } +} // namespace NeBuild
\ No newline at end of file |
