From 14c8b3f26b339b374ce161b15c29ced9aaadf9ad Mon Sep 17 00:00:00 2001 From: Karl-Wilfried Zimmer Date: Sun, 7 Jul 2024 17:32:34 +0200 Subject: [PATCH] added files --- .gitignore | 1 + .idea/.gitignore | 8 ++++++++ .idea/.name | 1 + .idea/Block.iml | 2 ++ .idea/misc.xml | 7 +++++++ .idea/modules.xml | 8 ++++++++ CMakeLists.txt | 34 ++++++++++++++++++++++++++++++++++ apps/CMakeLists.txt | 3 +++ apps/main.cpp | 25 +++++++++++++++++++++++++ include/Block/block.h | 14 ++++++++++++++ src/CMakeLists.txt | 12 ++++++++++++ src/block.cpp | 4 ++++ 12 files changed, 119 insertions(+) create mode 100644 .gitignore create mode 100644 .idea/.gitignore create mode 100644 .idea/.name create mode 100644 .idea/Block.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 CMakeLists.txt create mode 100644 apps/CMakeLists.txt create mode 100644 apps/main.cpp create mode 100644 include/Block/block.h create mode 100644 src/CMakeLists.txt create mode 100644 src/block.cpp diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..468d90c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*build*/ diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..ad926c8 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +block \ No newline at end of file diff --git a/.idea/Block.iml b/.idea/Block.iml new file mode 100644 index 0000000..f08604b --- /dev/null +++ b/.idea/Block.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..0b76fe5 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..b40f811 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..31a8c80 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,34 @@ +cmake_minimum_required(VERSION 3.15..3.30) + +project(block + VERSION 0.1 + LANGUAGES CXX) + +if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) + set_property(GLOBAL PROPERTY USE_FOLDERDS ON) + find_package(Doxygen) + if(Doxygen_FOUND) + #add_subdirectory(docs) + else() + message(STATUS "Doxygen not found, not building docs") + endif() + + add_subdirectory(apps/) + +endif() + +include(FetchContent) + +# Formatting library, adds fmt::fmt Always use the full git hash, not the tag, +# safer and faster to recompile +FetchContent_Declare( + vector + GIT_REPOSITORY https://concreteserver.ddns.net/gitea/CarboHydra/Vector.git + GIT_TAG main) +FetchContent_MakeAvailable(vector) + +add_subdirectory(${PROJECT_SOURCE_DIR}/src) + +#add_executable(vector main.cpp) + +#install(TARGETS vector RUNTIME DESTINATION bin) diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt new file mode 100644 index 0000000..5945e25 --- /dev/null +++ b/apps/CMakeLists.txt @@ -0,0 +1,3 @@ +add_executable(app main.cpp) + +target_link_libraries(app PRIVATE vector) diff --git a/apps/main.cpp b/apps/main.cpp new file mode 100644 index 0000000..4512149 --- /dev/null +++ b/apps/main.cpp @@ -0,0 +1,25 @@ +#include +#include "Vector/vector3.h" + +int main(int argc, char **argv) { + std::cout << "Hello, world!" << std::endl; + Vector::Vector3 vec(1,2,3); + Vector::Vector3 vec2(2,1,3); + std::cout<