summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-12-09 20:35:28 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-12-09 20:35:28 +0100
commit4e6fd1dd8c9762ea6543ec275fe57ca474f23d8f (patch)
tree39ec629f5b80beb10919677fd12d7b258aaa2e14 /include
parent26783733863f62c468a4c8cb2853badd54e30a39 (diff)
chore: codebase modernization and hygiene improvements.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/.keep0
-rw-r--r--include/NeBuildKit/Detail/Config.h40
-rw-r--r--include/NeBuildKit/IManifestBuilder.h7
-rw-r--r--include/NeBuildKit/JSONManifestBuilder.h5
-rw-r--r--include/NeBuildKit/TOMLManifestBuilder.h5
5 files changed, 24 insertions, 33 deletions
diff --git a/include/.keep b/include/.keep
deleted file mode 100644
index e69de29..0000000
--- a/include/.keep
+++ /dev/null
diff --git a/include/NeBuildKit/Detail/Config.h b/include/NeBuildKit/Detail/Config.h
index 915bde4..ddf93c1 100644
--- a/include/NeBuildKit/Detail/Config.h
+++ b/include/NeBuildKit/Detail/Config.h
@@ -16,32 +16,30 @@
#define LIKELY(ARG) ((ARG) ? assert(false) : ((void) 0))
#define UNLIKELY(ARG) LIKELY(!(ARG))
-#define LIBNEBUILD_VERSION "v0.0.7-buildkit"
+#define NEBUILD_VERSION "v0.0.8-buildkit"
-#define LIBNEBUILD_VERSION_BCD 0x0007
+#define NEBUILD_VERSION_BCD 0x0007
-#define LIBNEBUILD_VERSION_MAJOR 0
-#define LIBNEBUILD_VERSION_MINOR 0
-#define LIBNEBUILD_VERSION_PATCH 7
+#define NEBUILD_VERSION_MAJOR 0
+#define NEBUILD_VERSION_MINOR 0
+#define NEBUILD_VERSION_PATCH 7
-#define LIBNEBUILD_EXPORT_C extern "C"
+#define NEBUILD_EXPORT_C extern "C"
-#define LIBNEBUILD_UNUSED(X) ((void) X)
+#define NEBUILD_UNUSED(X) ((void) X)
namespace NeBuild {
- struct BuildConfig final {
- bool has_failed_{false};
- bool dry_run_{false};
- std::string path_{};
-
- explicit operator bool() {
- return has_failed_;
- }
-
- BuildConfig() = default;
- ~BuildConfig() {}
- };
-}
+struct BuildConfig final {
+ bool has_failed_{false};
+ bool dry_run_{false};
+ std::string path_{};
+
+ explicit operator bool() { return has_failed_; }
+
+ BuildConfig() = default;
+ ~BuildConfig() = default;
+};
+} // namespace NeBuild
namespace NeBuild::Logger {
/// @brief replacement for std::cout for NeBuild logging.
@@ -51,5 +49,3 @@ inline std::ostream& info() noexcept {
return out;
}
} // namespace NeBuild::Logger
-
-
diff --git a/include/NeBuildKit/IManifestBuilder.h b/include/NeBuildKit/IManifestBuilder.h
index 8131495..c42f257 100644
--- a/include/NeBuildKit/IManifestBuilder.h
+++ b/include/NeBuildKit/IManifestBuilder.h
@@ -6,6 +6,7 @@
#pragma once
#include <NeBuildKit/Detail/Config.h>
+#include <string_view>
#define NEBUILD_MANIFEST_BUILDER : public ::NeBuild::IManifestBuilder
@@ -19,8 +20,8 @@ class IManifestBuilder {
IManifestBuilder() = default;
virtual ~IManifestBuilder() = default;
- IManifestBuilder& operator=(const IManifestBuilder&) = default;
- IManifestBuilder(const IManifestBuilder&) = default;
+ IManifestBuilder& operator=(const IManifestBuilder&) = delete;
+ IManifestBuilder(const IManifestBuilder&) = delete;
/// =========================================================== ///
/// @brief Builds a TOML target from a file.
@@ -33,6 +34,6 @@ class IManifestBuilder {
/// =========================================================== ///
/// @brief Returns the build system name.
/// =========================================================== ///
- virtual const char* BuildSystem() = 0;
+ virtual const std::string_view BuildSystem() = 0;
};
} // namespace NeBuild \ No newline at end of file
diff --git a/include/NeBuildKit/JSONManifestBuilder.h b/include/NeBuildKit/JSONManifestBuilder.h
index 21f5f87..9f1afdc 100644
--- a/include/NeBuildKit/JSONManifestBuilder.h
+++ b/include/NeBuildKit/JSONManifestBuilder.h
@@ -17,9 +17,6 @@ class JSONManifestBuilder final NEBUILD_MANIFEST_BUILDER {
JSONManifestBuilder() = default;
~JSONManifestBuilder() override = default;
- JSONManifestBuilder& operator=(const JSONManifestBuilder&) = default;
- JSONManifestBuilder(const JSONManifestBuilder&) = default;
-
public:
/// =========================================================== ///
/// @brief Builds a JSON target from a JSON file.
@@ -32,6 +29,6 @@ class JSONManifestBuilder final NEBUILD_MANIFEST_BUILDER {
/// =========================================================== ///
/// @brief Returns the build system name.
/// =========================================================== ///
- const char* BuildSystem() override;
+ const std::string_view BuildSystem() override;
};
} // namespace NeBuild \ No newline at end of file
diff --git a/include/NeBuildKit/TOMLManifestBuilder.h b/include/NeBuildKit/TOMLManifestBuilder.h
index 7caf9d6..1c6bb1b 100644
--- a/include/NeBuildKit/TOMLManifestBuilder.h
+++ b/include/NeBuildKit/TOMLManifestBuilder.h
@@ -17,9 +17,6 @@ class TOMLManifestBuilder final NEBUILD_MANIFEST_BUILDER {
TOMLManifestBuilder() = default;
~TOMLManifestBuilder() override = default;
- TOMLManifestBuilder& operator=(const TOMLManifestBuilder&) = default;
- TOMLManifestBuilder(const TOMLManifestBuilder&) = default;
-
public:
/// =========================================================== ///
/// @brief Builds a TOML target from a TOML file.
@@ -32,6 +29,6 @@ class TOMLManifestBuilder final NEBUILD_MANIFEST_BUILDER {
/// =========================================================== ///
/// @brief Returns the build system name.
/// =========================================================== ///
- const char* BuildSystem() override;
+ const std::string_view BuildSystem() override;
};
} // namespace NeBuild \ No newline at end of file