From 947049dea4f266e913d1ac4323d66e0aa344d3a5 Mon Sep 17 00:00:00 2001 From: Daniel Derkacz-Bogner Date: Sun, 25 Sep 2022 11:05:12 +0200 Subject: [PATCH 1/2] Created Docker pipeline --- CMakeLists.txt | 16 ++++++++++++++++ Dockerfile | 9 +++++++++ codelibrary/base/algorithm.h | 1 + 3 files changed, 26 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 Dockerfile diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..f14eca2 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 3.20) +project(supervoxel) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) + +file(GLOB_RECURSE HEADER_FILES + codelibrary +) + +file(GLOB_RECURSE SOURCE_FILES + codelibrary/*.cpp +) + +add_executable(supervoxel main.cc ${SOURCE_FILES}) +target_include_directories(supervoxel PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}") \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..172fea5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM ubuntu:22.10 +RUN apt update +RUN apt install -y build-essential cmake +COPY . code +WORKDIR code +RUN mkdir build +WORKDIR build +RUN cmake .. && cmake --build . +# RUN gcc main.cc -o supervoxel \ No newline at end of file diff --git a/codelibrary/base/algorithm.h b/codelibrary/base/algorithm.h index 7e0ab70..06df336 100644 --- a/codelibrary/base/algorithm.h +++ b/codelibrary/base/algorithm.h @@ -13,6 +13,7 @@ #include #include #include +#include #include "codelibrary/base/array.h" From fb2c87ad4fba0a2597c3d731b326deca99582ac5 Mon Sep 17 00:00:00 2001 From: Daniel Derkacz-Bogner Date: Sun, 25 Sep 2022 11:05:44 +0200 Subject: [PATCH 2/2] Specify pointcloud through commandline --- main.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.cc b/main.cc index 451558a..b8a9ef5 100644 --- a/main.cc +++ b/main.cc @@ -61,10 +61,10 @@ void WritePoints(const char* filename, // system(filename); } -int main() { +int main(int argc, char** argv) { LOG_ON(INFO); - const std::string filename = "test.xyz"; + const std::string filename = argv[1]; cl::Array points; cl::Array colors;