-
Notifications
You must be signed in to change notification settings - Fork 7
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
1 parent
1c791ef
commit 7e1f4a0
Showing
10 changed files
with
159 additions
and
90 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 |
---|---|---|
@@ -1,24 +1,95 @@ | ||
cmake_minimum_required(VERSION 3.1) | ||
project(lnrr) | ||
set (${PROJECT_NAME}_VERSION_MAJOR 1) | ||
set (${PROJECT_NAME}_VERSION_MINOR 0) | ||
set(CMAKE_CXX_STANDARD 17) # avoid using EIGEN_MAKE_ALIGNED_OPERATOR_NEW | ||
# add_compile_options(-march=native) | ||
add_compile_options(-O3) | ||
# add_compile_options(-g) | ||
add_compile_options(-std=c++17) | ||
# add_compile_options(-fopenmp) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp") | ||
set(LNRR_VERSION 0.1.0) | ||
set(PROJECT_SOVERSION 0) | ||
|
||
find_package(Eigen3 3.1 REQUIRED) | ||
message(STATUS "[fgt] Eigen3 version: ${EIGEN3_VERSION}") | ||
project(lnrr CXX) | ||
|
||
message(STATUS "[lnrr] Compiler: ${CMAKE_CXX_COMPILER_ID}") | ||
|
||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") | ||
|
||
find_package(Eigen3 REQUIRED) | ||
message(STATUS "[lnrr] Eigen3 version: ${EIGEN3_VERSION}") | ||
|
||
add_library(Library-C++ | ||
src/scan_to_model.cpp | ||
) | ||
target_include_directories(Library-C++ | ||
) | ||
target_include_directories(Library-C++ INTERFACE | ||
"$<BUILD_INTERFACE:${EIGEN3_INCLUDE_DIR}>" | ||
"$<INSTALL_INTERFACE:include>" | ||
PRIVATE include ${EIGEN3_INCLUDE_DIR} | ||
) | ||
set_target_properties(Library-C++ PROPERTIES | ||
OUTPUT_NAME lnrr | ||
VERSION ${LNRR_VERSION} | ||
SOVERSION ${PROJECT_SOVERSION} | ||
) | ||
target_compile_definitions(Library-C++ | ||
PUBLIC | ||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:include> | ||
${EIGEN3_INCLUDE_DIR} | ||
FGT_WITH_OPENMP | ||
) | ||
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") | ||
target_compile_options(Library-C++ | ||
PUBLIC | ||
-std=c++11 | ||
PRIVATE | ||
-Wall | ||
-pedantic | ||
# The no-nested-anon-types is for nanoflann | ||
-Wno-nested-anon-types | ||
) | ||
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") | ||
target_compile_options(Library-C++ | ||
PUBLIC | ||
-std=c++11 | ||
# For some deprecations inside Eigen | ||
-Wno-deprecated-declarations | ||
PRIVATE | ||
-Wall | ||
-pedantic | ||
# For pragma omp's | ||
-Wno-unknown-pragmas | ||
) | ||
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC") | ||
target_compile_options(Library-C++ | ||
PUBLIC | ||
# Eigen does relative includes | ||
/wd4464 | ||
# This is the famous "unreferenced inline function has been removed" | ||
/wd4514 | ||
# Yo, I don't care if that function wasn't inlined | ||
/wd4710 | ||
# Padding | ||
/wd4820 | ||
# Automatic inline expansion | ||
/wd4711 | ||
) | ||
endif() | ||
install(DIRECTORY include/lnrr DESTINATION include) | ||
install(TARGETS Library-C++ | ||
DESTINATION lib | ||
EXPORT lnrr-targets | ||
) | ||
|
||
include(GenerateExportHeader) | ||
generate_export_header(Library-C++) | ||
|
||
include(CMakePackageConfigHelpers) | ||
configure_file(cmake/lnrr-config.cmake | ||
${PROJECT_BINARY_DIR}/lnrr-config.cmake | ||
@ONLY | ||
) | ||
write_basic_package_version_file( | ||
${PROJECT_BINARY_DIR}/lnrr-config-version.cmake | ||
VERSION ${LNRR_VERSION} | ||
COMPATIBILITY AnyNewerVersion | ||
) | ||
install(FILES | ||
${PROJECT_BINARY_DIR}/lnrr-config.cmake | ||
${PROJECT_BINARY_DIR}/lnrr-config-version.cmake | ||
DESTINATION lib/cmake/lnrr | ||
) | ||
install(EXPORT lnrr-targets | ||
DESTINATION lib/cmake/lnrr | ||
NAMESPACE Lnrr:: | ||
) |
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
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 @@ | ||
include("${CMAKE_CURRENT_LIST_DIR}/lnrr-targets.cmake") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions
6
include/ceres/cost_U_scan_to_model.h → include/lnrr/ceres/cost_U_scan_to_model.h
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
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
File renamed without changes.
File renamed without changes.
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
Oops, something went wrong.