-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
umgnunes
committed
Oct 12, 2023
0 parents
commit 14db8a7
Showing
28 changed files
with
3,657 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
BasedOnStyle: Google | ||
AlwaysBreakAfterDefinitionReturnType: All | ||
AlwaysBreakAfterReturnType: All | ||
BreakBeforeBraces: Allman | ||
DerivePointerAlignment: 'false' | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Prerequisites | ||
*.d | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
|
||
# Created folders | ||
build | ||
*~ | ||
|
||
# Dockerfile | ||
Dockerfile | ||
.dockerignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Prerequisites | ||
*.d | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
|
||
# Created folders | ||
build | ||
data | ||
datasets | ||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
cmake_minimum_required(VERSION 3.16.3) | ||
|
||
set(LIB_NAME ETTCM) | ||
project(${LIB_NAME} LANGUAGES CXX) | ||
|
||
# C++ version | ||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
||
set(${LIB_NAME}_DOC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/doc) | ||
set(${LIB_NAME}_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include) | ||
set(${LIB_NAME}_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src) | ||
|
||
# CXX flags | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Werror -march=native -mtune=native -fPIC") | ||
|
||
# Default to Release | ||
set(DEFAULT_BUILD_TYPE "Release") | ||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) | ||
message(STATUS "Setting build type to '${DEFAULT_BUILD_TYPE}' as none was specified.") | ||
set(CMAKE_BUILD_TYPE "${DEFAULT_BUILD_TYPE}" CACHE STRING "Choose the type of build." FORCE) | ||
# Set the possible values of build type for cmake-gui | ||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS | ||
"Debug" "Release" "MinSizeRel" "RelWithDebInfo") | ||
endif() | ||
|
||
# Options | ||
option(${LIB_NAME}_BUILD_DOC "Build documentation" ON) | ||
|
||
# Dependencies | ||
include(FetchContent) | ||
set(FETCHCONTENT_QUIET OFF) | ||
|
||
# pontella | ||
FetchContent_Declare( | ||
pontella | ||
GIT_REPOSITORY https://github.com/neuromorphic-paris/pontella | ||
GIT_TAG master | ||
) | ||
FetchContent_MakeAvailable(pontella) | ||
|
||
# sepia | ||
FetchContent_Declare( | ||
sepia | ||
GIT_REPOSITORY https://github.com/neuromorphic-paris/sepia | ||
GIT_TAG master | ||
) | ||
FetchContent_MakeAvailable(sepia) | ||
|
||
# Eigen | ||
find_package(Eigen3 3.3 REQUIRED NO_MODULE) | ||
|
||
# OpenCV | ||
find_package(OpenCV) | ||
if(${OPENCV_FOUND}) | ||
message(STATUS "OpenCV version found - ${OpenCV_VERSION}") | ||
else() | ||
message(STATUS "OpenCV not found") | ||
endif() | ||
|
||
# Source | ||
add_subdirectory(${${LIB_NAME}_SOURCE_DIR}) | ||
|
||
# Documentation | ||
if(${LIB_NAME}_BUILD_DOC) | ||
add_subdirectory(${${LIB_NAME}_DOC_DIR}) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
FROM ubuntu:20.04 | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
# Base dependencies | ||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get -y install build-essential cmake git doxygen graphviz pkg-config libeigen3-dev wget | ||
|
||
WORKDIR /root | ||
|
||
# Eigen | ||
RUN git clone https://gitlab.com/libeigen/eigen.git && \ | ||
cd eigen && \ | ||
git checkout 27367017bd0aef15a67ce76b8e263a94c2508a1c && \ | ||
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=~/.local && \ | ||
cmake --build build && \ | ||
cmake --build build --target install | ||
|
||
# OpenCV | ||
RUN git clone https://github.com/opencv/opencv.git && \ | ||
cd opencv && \ | ||
git checkout 82ac7ea23620fb13b7b6be225fa1b0e848f5e72d | ||
RUN git clone https://github.com/opencv/opencv_contrib.git && \ | ||
cd opencv_contrib && \ | ||
git checkout c4027ab7f912a3053175477d41b1a62d0078bc5f | ||
RUN cd opencv && \ | ||
cmake -S . -B build -DOPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules -DCMAKE_INSTALL_PREFIX=~/.local && \ | ||
cmake --build build && \ | ||
cmake --build build --target install | ||
|
||
# ETTCM | ||
RUN mkdir ETTCM | ||
COPY . ETTCM | ||
|
||
WORKDIR /root/ETTCM | ||
|
||
RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DEigen3_DIR=~/.local/share/eigen3/cmake -DOpenCV_DIR=~/.local/lib/cmake/opencv4 && \ | ||
cmake --build build && \ | ||
make -C build doc |
Oops, something went wrong.