Skip to content

Commit 1000d3b

Browse files
author
Daniel
authored
Merge pull request #2 from danielTobon43/feat/cloudparse
Feat/cloudparse
2 parents 9915bff + 1732fe0 commit 1000d3b

File tree

6 files changed

+289
-380
lines changed

6 files changed

+289
-380
lines changed

.clang-format

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BasedOnStyle: Google
2+
ColumnLimit: 180

.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Prerequisites
2+
*.d
3+
4+
# Compiled Object files
5+
*.slo
6+
*.lo
7+
*.o
8+
*.obj
9+
10+
# Precompiled Headers
11+
*.gch
12+
*.pch
13+
14+
# Compiled Dynamic libraries
15+
*.so
16+
*.dylib
17+
*.dll
18+
19+
# Fortran module files
20+
*.mod
21+
*.smod
22+
23+
# Compiled Static libraries
24+
*.lai
25+
*.la
26+
*.a
27+
*.lib
28+
29+
# Executables
30+
*.exe
31+
*.out
32+
*.app
33+
34+
# Folders
35+
build/
36+
build-vscode/
37+
PCL-Build-Action/
38+
.vscode
39+
40+
# nektos/act secrets
41+
.secrets

CMakeLists.txt

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# #############################################################################
2+
# CMAKE CONFIGURATION
3+
# #############################################################################
4+
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
5+
6+
set(CMAKE_BUILD_TYPE_INIT Release)
7+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
8+
9+
include("${CMAKE_CURRENT_LIST_DIR}/cmake/functions.cmake")
10+
11+
project(upsampling_cloud VERSION 1.1.0 LANGUAGES CXX)
12+
13+
message("\n" "=========================================")
14+
message("Project: ${PROJECT_NAME} ")
15+
message("=========================================")
16+
17+
# set the CMP0074 policy to old behavior (disable warnings) (CMake 3.12.0-rc1)
18+
if(${CMAKE_VERSION} MATCHES 3.12.0)
19+
cmake_policy(SET CMP0074 OLD)
20+
21+
if(POLICY CMP0048)
22+
cmake_policy(SET CMP0048 NEW)
23+
endif(POLICY CMP0048)
24+
endif()
25+
26+
# #############################################################################
27+
# PACKAGES
28+
# #############################################################################
29+
find_package(PCL 1.8 REQUIRED QUIET)
30+
31+
if(PCL_FOUND)
32+
message(STATUS "PCL status:")
33+
message(STATUS " version: ${PCL_VERSION}")
34+
message(STATUS " directory: ${PCL_DIR}")
35+
else()
36+
message(FATAL_ERROR " ERROR: PCL minimum required version 1.8. Not found")
37+
endif()
38+
39+
fetch_project(
40+
NAME cloudparse
41+
URL https://github.com/danielTobon43/cloudparse/archive/v0.2.1.tar.gz
42+
)
43+
44+
# #############################################################################
45+
# SOURCE CODE
46+
# #############################################################################
47+
set(MAIN_SOURCE "src/main.cpp")
48+
49+
# #############################################################################
50+
# EXECUTABLES
51+
# #############################################################################
52+
add_executable(${PROJECT_NAME} ${MAIN_SOURCE})
53+
54+
# #############################################################################
55+
# HEADERS
56+
# #############################################################################
57+
target_include_directories(${PROJECT_NAME} PRIVATE
58+
${PCL_INCLUDE_DIRS}
59+
)
60+
61+
# #############################################################################
62+
# TARGET LIBRARIES
63+
# #############################################################################
64+
target_link_libraries(${PROJECT_NAME} PRIVATE
65+
${PCL_LIBRARIES}
66+
cloudparse
67+
)
68+
69+
# #############################################################################
70+
# COMPILATION FLAGS: MMX, SSE(1, 2, 3, 3S, 4.1, 4.2), CLMUL, RdRand, VT-x, x86-64
71+
# #############################################################################
72+
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-cpp
73+
-mmmx
74+
-msse
75+
-msse2
76+
-msse3
77+
-mssse3
78+
-msse4.2
79+
-msse4.1
80+
-mno-sse4a
81+
-mno-avx
82+
-mno-avx2
83+
-mno-fma
84+
-mno-fma4
85+
-mno-f16c
86+
-mno-xop
87+
-mno-bmi
88+
-mno-bmi2
89+
-mrdrnd
90+
-mno-3dnow
91+
-mlzcnt
92+
-mfsgsbase
93+
-mpclmul
94+
)
95+
96+
# #############################################################################
97+
# INSTALL DIRECTORY
98+
# #############################################################################
99+
install(TARGETS ${PROJECT_NAME}
100+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
101+
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
102+
)
103+
104+
message("=========================================")
105+
message("Project: ${PROJECT_NAME} COMPILED WITH CMAKE " ${CMAKE_VERSION})
106+
message("=========================================")

cmake/functions.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
include(FetchContent)
2+
3+
function(fetch_project)
4+
cmake_parse_arguments(FETCH_SOURCE "" "NAME;URL" "" ${ARGN})
5+
FetchContent_Declare(${FETCH_SOURCE_NAME}
6+
URL ${FETCH_SOURCE_URL}
7+
)
8+
9+
FetchContent_MakeAvailable(${FETCH_SOURCE_NAME})
10+
endfunction()

src/CMakeLists.txt

Lines changed: 0 additions & 106 deletions
This file was deleted.

0 commit comments

Comments
 (0)