pmt: Improvement.
- At build time, the version, compile time, CMake version, compiler version, and compiler flags are retrieved with the new CMake module and a header is created. This header provides more robust version management and notifications. - Build warnings fixed, code corrected for compilation. - Improvements were made to CMake code. - Modifications were made to the tests to read the library's version information.
This commit is contained in:
@@ -223,13 +223,13 @@ bool eraseDirectoryRecursive(const std::string_view directory)
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string_view readSymlink(const std::string_view entry)
|
||||
std::string readSymlink(const std::string_view entry)
|
||||
{
|
||||
char target[PATH_MAX];
|
||||
ssize_t len = readlink(entry.data(), target, (sizeof(target) - 1));
|
||||
if (len == -1) {
|
||||
throw Error("Cannot read symlink %s: %s", entry.data(), strerror(errno));
|
||||
return entry;
|
||||
return entry.data();
|
||||
}
|
||||
|
||||
target[len] = '\0';
|
||||
|
||||
Reference in New Issue
Block a user