From a39b56c084beb1141119fbb7c73483966ade7e92 Mon Sep 17 00:00:00 2001 From: zhaohe Date: Sun, 13 Aug 2023 15:35:22 +0800 Subject: [PATCH] update --- .clang-format | 9 +++++ .gitmodules | 5 +-- .vscode/settings.json | 69 +++++++++++++++++++++++++++++++++ CMakeLists.txt | 17 +++++++- build.sh | 6 ++- iflytopcpp | 1 - src/service/iflytop_can_host_device.cpp | 1 + src/service/iflytop_can_host_device.hpp | 19 +++++++++ 8 files changed, 118 insertions(+), 9 deletions(-) create mode 100644 .clang-format create mode 100644 .vscode/settings.json delete mode 160000 iflytopcpp create mode 100644 src/service/iflytop_can_host_device.cpp create mode 100644 src/service/iflytop_can_host_device.hpp diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..45866f9 --- /dev/null +++ b/.clang-format @@ -0,0 +1,9 @@ +# Defines the Chromium style for automatic reformatting. +# http://clang.llvm.org/docs/ClangFormatStyleOptions.html +Language: Cpp +BasedOnStyle: Google +ColumnLimit: 160 +AlignConsecutiveMacros: true +AlignConsecutiveDeclarations: true +AlignConsecutiveAssignments: true +AlignOperands: true \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 7b82f2a..51ffd1a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "iflytopcpp"] - path = iflytopcpp - url = zwsd@192.168.1.3:z2nd_lib/iflytopcpp.git [submodule "zcmake"] path = zcmake - url = zwsd@192.168.1.3:zwsd_common_lib/zcmake.git + url = zwsd@192.168.1.3:zwsd_common_lib/zcmake.git \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..be51cd0 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,69 @@ +{ + "files.associations": { + "array": "cpp", + "atomic": "cpp", + "bit": "cpp", + "*.tcc": "cpp", + "bitset": "cpp", + "cctype": "cpp", + "charconv": "cpp", + "chrono": "cpp", + "clocale": "cpp", + "cmath": "cpp", + "condition_variable": "cpp", + "cstdarg": "cpp", + "cstddef": "cpp", + "cstdint": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cstring": "cpp", + "ctime": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "deque": "cpp", + "forward_list": "cpp", + "list": "cpp", + "map": "cpp", + "set": "cpp", + "unordered_map": "cpp", + "vector": "cpp", + "exception": "cpp", + "algorithm": "cpp", + "functional": "cpp", + "iterator": "cpp", + "memory": "cpp", + "memory_resource": "cpp", + "numeric": "cpp", + "optional": "cpp", + "random": "cpp", + "ratio": "cpp", + "regex": "cpp", + "string": "cpp", + "string_view": "cpp", + "system_error": "cpp", + "tuple": "cpp", + "type_traits": "cpp", + "utility": "cpp", + "fstream": "cpp", + "future": "cpp", + "initializer_list": "cpp", + "iomanip": "cpp", + "iosfwd": "cpp", + "iostream": "cpp", + "istream": "cpp", + "limits": "cpp", + "mutex": "cpp", + "new": "cpp", + "ostream": "cpp", + "shared_mutex": "cpp", + "sstream": "cpp", + "stdexcept": "cpp", + "streambuf": "cpp", + "thread": "cpp", + "cinttypes": "cpp", + "typeindex": "cpp", + "typeinfo": "cpp", + "valarray": "cpp", + "variant": "cpp" + } +} \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 42815dc..7099291 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,19 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") message("CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}") message("PROJECT_NAME: ${PROJECT_NAME}") -file(GLOB_RECURSE VAR_APP_SOURCE src/*.cpp) +file(GLOB_RECURSE VAR_APP_SOURCE # + src/*.cpp # + src/*.c iflytopcpp/*.cpp iflytopcpp/*.c) -zadd_executable(TARGET app.out SRC ${VAR_APP_SOURCE}) +message("VAR_APP_SOURCE: ${VAR_APP_SOURCE}") + +zadd_executable( + TARGET + app.out # + SRC + ${VAR_APP_SOURCE} + # + INCLUDE_DIRECTORIES + src + iflytopcpp/core/spdlog/include + ./) diff --git a/build.sh b/build.sh index fbdf561..7c4aab0 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,7 @@ -mkdir build +mkdir -p build cd build cmake .. \ -DCMAKE_C_COMPILER='aarch64-linux-gnu-gcc' \ - -DCMAKE_CXX_COMPILER='aarch64-linux-gnu-g++' \ + -DCMAKE_CXX_COMPILER='aarch64-linux-gnu-g++' + +make -j8 diff --git a/iflytopcpp b/iflytopcpp deleted file mode 160000 index 3b6ad55..0000000 --- a/iflytopcpp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3b6ad55660aa6aae464021efe19f6b698f03047f diff --git a/src/service/iflytop_can_host_device.cpp b/src/service/iflytop_can_host_device.cpp new file mode 100644 index 0000000..d253e29 --- /dev/null +++ b/src/service/iflytop_can_host_device.cpp @@ -0,0 +1 @@ +#include "iflytop_can_host_device.hpp" \ No newline at end of file diff --git a/src/service/iflytop_can_host_device.hpp b/src/service/iflytop_can_host_device.hpp new file mode 100644 index 0000000..c330d6c --- /dev/null +++ b/src/service/iflytop_can_host_device.hpp @@ -0,0 +1,19 @@ +#pragma once +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace iflytop { +using namespace std; +class IflytopCanHostDevice { + public: + IflytopCanHostDevice(){}; +}; +} // namespace iflytop +