Implements rotgen::quaternion
Closes #19 Co-authored-by: Jules Pénuchot <jules@penuchot.com>
This commit is contained in:
parent
aba4d65feb
commit
c400650f1a
53 changed files with 995 additions and 84 deletions
|
|
@ -1,14 +1,14 @@
|
|||
##======================================================================================================================
|
||||
##==============================================================================
|
||||
## ROTGEN - Runtime Overlay for Eigen
|
||||
## Copyright : CODE RECKONS
|
||||
## SPDX-License-Identifier: BSL-1.0
|
||||
##======================================================================================================================
|
||||
##==============================================================================
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
enable_testing()
|
||||
|
||||
##======================================================================================================================
|
||||
##==============================================================================
|
||||
## Setup project
|
||||
##======================================================================================================================
|
||||
##==============================================================================
|
||||
set(ROTGEN_MAJOR_VERSION 0)
|
||||
set(ROTGEN_MINOR_VERSION 0)
|
||||
set(ROTGEN_PATCH_VERSION 1)
|
||||
|
|
@ -18,16 +18,16 @@ set(PROJECT_VERSION ${ROTGEN_VERSION})
|
|||
project(ROTGEN VERSION ${PROJECT_VERSION} DESCRIPTION "Runtime Overlay for Eigen" LANGUAGES CXX)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ROTGEN_SOURCE_DIR}/cmake )
|
||||
|
||||
##======================================================================================================================
|
||||
##==============================================================================
|
||||
## Prevent in-source build
|
||||
##======================================================================================================================
|
||||
##==============================================================================
|
||||
if (${PROJECT_SOURCE_DIR} STREQUAL ${PROJECT_BINARY_DIR})
|
||||
message(FATAL_ERROR "[${PROJECT_NAME}]: In-source build is not supported")
|
||||
endif()
|
||||
|
||||
##======================================================================================================================
|
||||
##==============================================================================
|
||||
## Handle options
|
||||
##======================================================================================================================
|
||||
##==============================================================================
|
||||
option(ROTGEN_FORCE_DYNAMIC "Force dynamic configuration for rotgen" OFF)
|
||||
option(ROTGEN_ENABLE_EXPRESSION_TEMPLATES "Enable expression templates" OFF)
|
||||
set(ROTGEN_MAX_SIZE "" CACHE STRING "Max matrix number of elements for rotgen (integer)")
|
||||
|
|
@ -35,13 +35,14 @@ set(ROTGEN_MAX_SIZE "" CACHE STRING "Max matrix number of elements for rotgen (i
|
|||
include(${ROTGEN_SOURCE_DIR}/cmake/options.cmake)
|
||||
handle_option(ROTGEN_COMPILE_DEFS)
|
||||
|
||||
##======================================================================================================================
|
||||
##==============================================================================
|
||||
## Sources & Public Headers lists
|
||||
##======================================================================================================================
|
||||
##==============================================================================
|
||||
if(ROTGEN_FORCE_DYNAMIC)
|
||||
set ( SOURCES
|
||||
src/map/impl.cpp
|
||||
src/matrix/impl.cpp
|
||||
src/quaternion/impl.cpp
|
||||
src/block/impl.cpp
|
||||
src/svd/impl.cpp
|
||||
src/info.cpp
|
||||
|
|
@ -53,14 +54,14 @@ else()
|
|||
)
|
||||
endif()
|
||||
|
||||
##======================================================================================================================
|
||||
##==============================================================================
|
||||
## Setup the library's dependencies
|
||||
##======================================================================================================================
|
||||
##==============================================================================
|
||||
find_package (Eigen3 3.4 REQUIRED NO_MODULE)
|
||||
|
||||
##======================================================================================================================
|
||||
##==============================================================================
|
||||
## Setup the library's build
|
||||
##======================================================================================================================
|
||||
##==============================================================================
|
||||
if(NOT MSVC)
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
endif()
|
||||
|
|
@ -71,6 +72,11 @@ set_target_properties(rotgen PROPERTIES VERSION ${PROJECT_VERSION})
|
|||
set_target_properties(rotgen PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR})
|
||||
|
||||
target_compile_options(rotgen PUBLIC -std=c++20 -Werror -Wall -Wextra -Wshadow -Wunused-variable)
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
|
||||
target_compile_options(rotgen PUBLIC -Wno-array-bounds)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(rotgen PUBLIC ${ROTGEN_COMPILE_DEFS})
|
||||
add_library(rotgen::rotgen ALIAS rotgen)
|
||||
|
||||
|
|
@ -81,12 +87,12 @@ target_include_directories(rotgen PUBLIC
|
|||
|
||||
target_link_libraries (rotgen PRIVATE Eigen3::Eigen)
|
||||
|
||||
##======================================================================================================================
|
||||
##==============================================================================
|
||||
## Setup the library's installation target
|
||||
##======================================================================================================================
|
||||
##==============================================================================
|
||||
include(${ROTGEN_SOURCE_DIR}/cmake/config/rotgen-install.cmake)
|
||||
|
||||
##======================================================================================================================
|
||||
##==============================================================================
|
||||
## Setup the library's Tests
|
||||
##======================================================================================================================
|
||||
##==============================================================================
|
||||
add_subdirectory(test)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue