mirror of
https://github.com/KjellKod/g3log.git
synced 2024-12-12 10:23:50 +01:00
fix OSX/Clang build warnings and 32-bit linking errors regarding build versin (#176)
This commit is contained in:
parent
ac54350346
commit
121bb9c790
@ -72,8 +72,14 @@ IF (${VERSION}.x STREQUAL ".x")
|
|||||||
MESSAGE("Extracting git software version")
|
MESSAGE("Extracting git software version")
|
||||||
execute_process(COMMAND bash "-c" "git rev-list --branches HEAD | wc -l | tr -d ' ' | tr -d '\n'" OUTPUT_VARIABLE GIT_VERSION)
|
execute_process(COMMAND bash "-c" "git rev-list --branches HEAD | wc -l | tr -d ' ' | tr -d '\n'" OUTPUT_VARIABLE GIT_VERSION)
|
||||||
SET(MINOR_VERSION 3)
|
SET(MINOR_VERSION 3)
|
||||||
SET(BUILD_NUMBER ${GIT_VERSION})
|
math(EXPR VERSION-BASE ${GIT_VERSION}/255)
|
||||||
SET(VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${BUILD_NUMBER})
|
math(EXPR VERSION-REMAINDER ${GIT_VERSION}%255)
|
||||||
|
message("git build version: ${GIT_VERSION}")
|
||||||
|
message("version base: ${VERSION-BASE}")
|
||||||
|
message("version remainder: ${VERSION-REMAINDER}")
|
||||||
|
# SET(BUILD_NUMBER ${GIT_VERSION})
|
||||||
|
SET(BUILD_NUMBER ${VERSION-BASE})
|
||||||
|
SET(VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${BUILD_NUMBER}-${VERSION-REMAINDER})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
MESSAGE("Software Version: ${VERSION}")
|
MESSAGE("Software Version: ${VERSION}")
|
||||||
|
|
||||||
|
@ -41,10 +41,10 @@ namespace g3 {
|
|||||||
|
|
||||||
FileSink::~FileSink() {
|
FileSink::~FileSink() {
|
||||||
std::string exit_msg {"g3log g3FileSink shutdown at: "};
|
std::string exit_msg {"g3log g3FileSink shutdown at: "};
|
||||||
exit_msg.append(localtime_formatted(systemtime_now(), internal::time_formatted)).append({"\n"});
|
exit_msg.append(localtime_formatted(systemtime_now(), internal::time_formatted)).append("\n");
|
||||||
filestream() << exit_msg << std::flush;
|
filestream() << exit_msg << std::flush;
|
||||||
|
|
||||||
exit_msg.append({"Log file at: ["}).append(_log_file_with_path).append({"]\n"});
|
exit_msg.append("Log file at: [").append(_log_file_with_path).append("]\n");
|
||||||
std::cerr << exit_msg << std::flush;
|
std::cerr << exit_msg << std::flush;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ LogCapture::LogCapture(const char *file, const int line, const char *function, c
|
|||||||
: _file(file), _line(line), _function(function), _level(level), _expression(expression), _fatal_signal(fatal_signal) {
|
: _file(file), _line(line), _function(function), _level(level), _expression(expression), _fatal_signal(fatal_signal) {
|
||||||
|
|
||||||
if (g3::internal::wasFatal(level)) {
|
if (g3::internal::wasFatal(level)) {
|
||||||
_stack_trace = {"\n*******\tSTACKDUMP *******\n"};
|
_stack_trace = std::string{"\n*******\tSTACKDUMP *******\n"};
|
||||||
_stack_trace.append(g3::internal::stackdump(dump));
|
_stack_trace.append(g3::internal::stackdump(dump));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ namespace g3 {
|
|||||||
|
|
||||||
if (_sinks.empty()) {
|
if (_sinks.empty()) {
|
||||||
std::string err_msg {"g3logworker has no sinks. Message: ["};
|
std::string err_msg {"g3logworker has no sinks. Message: ["};
|
||||||
err_msg.append(uniqueMsg.get()->toString()).append({"]\n"});
|
err_msg.append(uniqueMsg.get()->toString()).append("]\n");
|
||||||
std::cerr << err_msg;
|
std::cerr << err_msg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user