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
parent2e42c6c32cb29615c6c24df23d232d65f7a325f5 (diff)
Fix cout buffering issue, update CMake files.
-rw-r--r--ArcWelder/CMakeLists.txt11
-rw-r--r--ArcWelderConsole/ArcWelderConsole.cpp3
-rw-r--r--ArcWelderConsole/CMakeLists.txt8
-rw-r--r--ArcWelderInverseProcessor/CMakeLists.txt8
-rw-r--r--CMakeLists.txt3
-rw-r--r--CMakeSettings.json55
-rw-r--r--GcodeProcessorLib/CMakeLists.txt12
-rw-r--r--GcodeProcessorLib/logger.cpp5
-rw-r--r--PyArcWelder/CMakeLists.txt10
-rw-r--r--TCLAP/CMakeLists.txt2
10 files changed, 102 insertions, 15 deletions
diff --git a/ArcWelder/CMakeLists.txt b/ArcWelder/CMakeLists.txt
index f467537..a03c9fc 100644
--- a/ArcWelder/CMakeLists.txt
+++ b/ArcWelder/CMakeLists.txt
@@ -1,7 +1,9 @@
-cmake_minimum_required (VERSION "3.16")
+cmake_minimum_required (VERSION "3.13")
project(ArcWelder C CXX)
+option(USE_CXX_EXCEPTIONS "Enable C++ exception support" ON)
+
# add definitions from the GcodeProcessorLib project
add_definitions(${GcodeProcessorLib_DEFINITIONS})
@@ -15,7 +17,12 @@ include(sourcelist.cmake)
# Add a library using our ArcWelderSources variable from our sourcelist file
add_library(${PROJECT_NAME} STATIC ${ArcWelderSources})
-install(TARGETS ${PROJECT_NAME})
+install(
+ TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib # <-- Add this line
+ COMPONENT library
+)
# Link the GcodeProcessorLib
target_link_libraries(${PROJECT_NAME} GcodeProcessorLib)
diff --git a/ArcWelderConsole/ArcWelderConsole.cpp b/ArcWelderConsole/ArcWelderConsole.cpp
index 6ddf21e..b263a4a 100644
--- a/ArcWelderConsole/ArcWelderConsole.cpp
+++ b/ArcWelderConsole/ArcWelderConsole.cpp
@@ -163,7 +163,8 @@ int main(int argc, char* argv[])
static bool on_progress(arc_welder_progress progress)
{
- std::cout << progress.str() << "\n";
+ std::cout << progress.str() << std::endl;
+ std::cout.flush();
return true;
}
diff --git a/ArcWelderConsole/CMakeLists.txt b/ArcWelderConsole/CMakeLists.txt
index 721e8d9..2626f3c 100644
--- a/ArcWelderConsole/CMakeLists.txt
+++ b/ArcWelderConsole/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION "3.16")
+cmake_minimum_required (VERSION "3.13")
project(ArcWelderConsole C CXX)
@@ -15,7 +15,11 @@ include(sourcelist.cmake)
# Add an executable our ArcWelderConsoleSources variable from our sourcelist file
add_executable(${PROJECT_NAME} ${ArcWelderConsoleSources})
-install(TARGETS ${PROJECT_NAME})
+install(
+ TARGETS ${PROJECT_NAME}
+ DESTINATION bin
+)
+
# specify linking to the GcodeProcessorLib and ArcWelder libraries
target_link_libraries(${PROJECT_NAME} GcodeProcessorLib ArcWelder TCLAP)
diff --git a/ArcWelderInverseProcessor/CMakeLists.txt b/ArcWelderInverseProcessor/CMakeLists.txt
index f0fb19c..f2c1c5b 100644
--- a/ArcWelderInverseProcessor/CMakeLists.txt
+++ b/ArcWelderInverseProcessor/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION "3.16")
+cmake_minimum_required (VERSION "3.13")
project(ArcWelderInverseProcessor C CXX)
@@ -15,7 +15,11 @@ include(sourcelist.cmake)
# Add an executable our ArcWelderConsoleSources variable from our sourcelist file
add_executable(${PROJECT_NAME} ${ArcWelderInverseProcessorSources})
-install(TARGETS ${PROJECT_NAME})
+install(
+ TARGETS ${PROJECT_NAME}
+ DESTINATION bin
+)
+
# specify linking to the GcodeProcessorLib and ArcWelder libraries
target_link_libraries(${PROJECT_NAME} GcodeProcessorLib ArcWelder)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 99aa4c6..19cb971 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION "3.16")
+cmake_minimum_required (VERSION "3.13")
# You can tweak some common (for all subprojects) stuff here. For example:
project(Build C CXX)
@@ -9,6 +9,7 @@ set(CXX_STANDARD_REQUIRED)
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+option(USE_CXX_EXCEPTIONS "Enable C++ exception support" ON)
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
message(SEND_ERROR "In-source builds are not allowed.")
diff --git a/CMakeSettings.json b/CMakeSettings.json
new file mode 100644
index 0000000..524aa3a
--- /dev/null
+++ b/CMakeSettings.json
@@ -0,0 +1,55 @@
+{
+ "configurations": [
+ {
+ "name": "x64-Release",
+ "generator": "Ninja",
+ "configurationType": "RelWithDebInfo",
+ "buildRoot": "${projectDir}\\out\\build\\${name}",
+ "installRoot": "${projectDir}\\out\\install\\${name}",
+ "cmakeCommandArgs": "",
+ "buildCommandArgs": "-v",
+ "ctestCommandArgs": "",
+ "inheritEnvironments": [ "msvc_x64_x64" ],
+ "variables": []
+ },
+ {
+ "name": "x86-Release",
+ "generator": "Ninja",
+ "configurationType": "RelWithDebInfo",
+ "buildRoot": "${projectDir}\\out\\build\\${name}",
+ "installRoot": "${projectDir}\\out\\install\\${name}",
+ "cmakeCommandArgs": "",
+ "buildCommandArgs": "-v",
+ "ctestCommandArgs": "",
+ "inheritEnvironments": [ "msvc_x86" ],
+ "variables": []
+ },
+ {
+ "name": "Linux-GCC-Release",
+ "generator": "Unix Makefiles",
+ "configurationType": "Release",
+ "cmakeExecutable": "/usr/bin/cmake",
+ "remoteCopySourcesExclusionList": [ ".vs", ".git", "out" ],
+ "cmakeCommandArgs": "",
+ "buildCommandArgs": "",
+ "ctestCommandArgs": "",
+ "inheritEnvironments": [ "linux_arm" ],
+ "remoteMachineName": "${defaultRemoteMachineName}",
+ "remoteCMakeListsRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/src",
+ "remoteBuildRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/out/build/${name}",
+ "remoteInstallRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/out/install/${name}",
+ "remoteCopySources": true,
+ "rsyncCommandArgs": "-t --delete --delete-excluded",
+ "remoteCopyBuildOutput": false,
+ "remoteCopySourcesMethod": "rsync",
+ "addressSanitizerRuntimeFlags": "detect_leaks=0",
+ "variables": [
+ {
+ "name": "CMAKE_BUILD_TYPE",
+ "value": "RELEASE",
+ "type": "STRING"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
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();
}
diff --git a/PyArcWelder/CMakeLists.txt b/PyArcWelder/CMakeLists.txt
index f0b71fe..c17b561 100644
--- a/PyArcWelder/CMakeLists.txt
+++ b/PyArcWelder/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION "3.16")
+cmake_minimum_required (VERSION "3.13")
project(PyArcWelder C CXX)
@@ -18,7 +18,13 @@ include(sourcelist.cmake)
# Create our library
add_library(${PROJECT_NAME} SHARED ${PyArcWelderSources})
-install(TARGETS ${PROJECT_NAME})
+
+install(
+ TARGETS ${PROJECT_NAME}
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib # <-- Add this line
+ COMPONENT library
+)
set_target_properties(
${PROJECT_NAME}
diff --git a/TCLAP/CMakeLists.txt b/TCLAP/CMakeLists.txt
index 3c7686d..6b0b43f 100644
--- a/TCLAP/CMakeLists.txt
+++ b/TCLAP/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION "3.16")
+cmake_minimum_required (VERSION "3.13")
project(TCLAP C CXX)