Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FormerLurker/ArcWelderLib.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFormerLurker <hochgebe@gmail.com>2020-05-14 18:16:43 +0300
committerFormerLurker <hochgebe@gmail.com>2020-05-14 18:16:43 +0300
commitefb71a1cb55770d0d79de2ce783612737d59821a (patch)
tree73dabe71531658fac50ad027c6fb3a2524019a5b /GcodeProcessorLib
parent2e42c6c32cb29615c6c24df23d232d65f7a325f5 (diff)
Fix cout buffering issue, update CMake files.
Diffstat (limited to 'GcodeProcessorLib')
-rw-r--r--GcodeProcessorLib/CMakeLists.txt12
-rw-r--r--GcodeProcessorLib/logger.cpp5
2 files changed, 13 insertions, 4 deletions
diff --git a/GcodeProcessorLib/CMakeLists.txt b/GcodeProcessorLib/CMakeLists.txt
index 16cf7a7..a6143eb 100644
--- a/GcodeProcessorLib/CMakeLists.txt
+++ b/GcodeProcessorLib/CMakeLists.txt
@@ -1,7 +1,9 @@
-cmake_minimum_required (VERSION "3.16")
+cmake_minimum_required (VERSION "3.13")
project(GcodeProcessorLib C CXX)
+option(USE_CXX_EXCEPTIONS "Enable C++ exception support" ON)
+
# include sourcelist.cmake, which contains our source list and exposes it as the
# GcodeProcessorLibSources variable
include(sourcelist.cmake)
@@ -9,7 +11,13 @@ include(sourcelist.cmake)
# Add a library using our GcodeProcessorLibSources variable from our sourcelist file
add_library(${PROJECT_NAME} STATIC ${GcodeProcessorLibSources})
-install(TARGETS ${PROJECT_NAME})
+
+install(
+ TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib # <-- Add this line
+ COMPONENT library
+)
# Required on Unix OS family to be able to be linked into shared libraries.
set_target_properties(${PROJECT_NAME}
diff --git a/GcodeProcessorLib/logger.cpp b/GcodeProcessorLib/logger.cpp
index a556b3f..4af28d6 100644
--- a/GcodeProcessorLib/logger.cpp
+++ b/GcodeProcessorLib/logger.cpp
@@ -142,8 +142,9 @@ void logger::log(const int logger_type, const int log_level, const std::string&
// write the log
if (is_exception)
- std::cerr << output << "\n";
+ std::cerr << output << std::endl;
else
- std::cout << output << "\n";
+ std::cout << output << std::endl;
+ std::cout.flush();
}