summaryrefslogtreecommitdiff
path: root/src/utils/cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-03-14 16:21:55 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-03-15 13:12:48 +0100
commitd0f2ba0ab15e63aa3511218a837eb6f057632ace (patch)
tree999aabe895ceee4dc692745b759b6279abb3885c /src/utils/cpp
parent208e2af5b78167777f64864c209f0af6ad4d1ef7 (diff)
downloadjustbuild-d0f2ba0ab15e63aa3511218a837eb6f057632ace.tar.gz
Clean up more includes and targets
Some of the more specific issues addressed: - missing log_level target/include - header-only libs wrongly marking deps as private - missing/misplaced gsl includes
Diffstat (limited to 'src/utils/cpp')
-rw-r--r--src/utils/cpp/TARGETS9
-rw-r--r--src/utils/cpp/file_locking.cpp2
-rw-r--r--src/utils/cpp/tmp_dir.cpp3
-rw-r--r--src/utils/cpp/tmp_dir.hpp1
4 files changed, 12 insertions, 3 deletions
diff --git a/src/utils/cpp/TARGETS b/src/utils/cpp/TARGETS
index 578996b2..dbc409a6 100644
--- a/src/utils/cpp/TARGETS
+++ b/src/utils/cpp/TARGETS
@@ -59,9 +59,12 @@
, "name": ["tmp_dir"]
, "hdrs": ["tmp_dir.hpp"]
, "srcs": ["tmp_dir.cpp"]
- , "deps": [["@", "gsl", "", "gsl"]]
, "stage": ["src", "utils", "cpp"]
- , "private-deps": [["src/buildtool/file_system", "file_system_manager"]]
+ , "private-deps":
+ [ ["src/buildtool/file_system", "file_system_manager"]
+ , ["src/buildtool/logging", "log_level"]
+ , ["src/buildtool/logging", "logging"]
+ ]
}
, "file_locking":
{ "type": ["@", "rules", "CC", "library"]
@@ -72,6 +75,8 @@
, "stage": ["src", "utils", "cpp"]
, "private-deps":
[ ["src/buildtool/file_system", "file_system_manager"]
+ , ["src/buildtool/logging", "log_level"]
+ , ["src/buildtool/logging", "logging"]
, ["src/utils/cpp", "path"]
]
}
diff --git a/src/utils/cpp/file_locking.cpp b/src/utils/cpp/file_locking.cpp
index c633b32b..f4b6eb2c 100644
--- a/src/utils/cpp/file_locking.cpp
+++ b/src/utils/cpp/file_locking.cpp
@@ -17,6 +17,8 @@
#include <sys/file.h>
#include "src/buildtool/file_system/file_system_manager.hpp"
+#include "src/buildtool/logging/log_level.hpp"
+#include "src/buildtool/logging/logger.hpp"
#include "src/utils/cpp/path.hpp"
auto LockFile::Acquire(std::filesystem::path const& fspath,
diff --git a/src/utils/cpp/tmp_dir.cpp b/src/utils/cpp/tmp_dir.cpp
index 987bcbcf..11f10559 100644
--- a/src/utils/cpp/tmp_dir.cpp
+++ b/src/utils/cpp/tmp_dir.cpp
@@ -14,8 +14,9 @@
#include "src/utils/cpp/tmp_dir.hpp"
-#include "gsl/gsl"
#include "src/buildtool/file_system/file_system_manager.hpp"
+#include "src/buildtool/logging/log_level.hpp"
+#include "src/buildtool/logging/logger.hpp"
auto TmpDir::Create(std::filesystem::path const& prefix,
std::string const& dir_template) noexcept -> TmpDirPtr {
diff --git a/src/utils/cpp/tmp_dir.hpp b/src/utils/cpp/tmp_dir.hpp
index 3801e7a0..9188fa60 100644
--- a/src/utils/cpp/tmp_dir.hpp
+++ b/src/utils/cpp/tmp_dir.hpp
@@ -17,6 +17,7 @@
#include <cstdlib>
#include <filesystem>
+#include <memory>
#include <optional>
#include <string>