Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
imu
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
wolf_projects
wolf_lib
plugins
imu
Commits
64ac5d59
Commit
64ac5d59
authored
6 years ago
by
Joaquim Casals Buñuel
Browse files
Options
Downloads
Patches
Plain Diff
Fix CMake. Only using Config file
parent
23639f8e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!39
release after RAL
,
!38
After 2nd RAL submission
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+10
-18
10 additions, 18 deletions
CMakeLists.txt
cmake_modules/wolfIMUConfig.cmake
+48
-205
48 additions, 205 deletions
cmake_modules/wolfIMUConfig.cmake
test/CMakeLists.txt
+7
-7
7 additions, 7 deletions
test/CMakeLists.txt
with
65 additions
and
230 deletions
CMakeLists.txt
+
10
−
18
View file @
64ac5d59
...
@@ -11,6 +11,7 @@ SET(CMAKE_MACOSX_RPATH 1)
...
@@ -11,6 +11,7 @@ SET(CMAKE_MACOSX_RPATH 1)
# The project name
# The project name
PROJECT
(
IMU
)
PROJECT
(
IMU
)
set
(
PLUGIN_NAME
"wolf
${
PROJECT_NAME
}
"
)
SET
(
EXECUTABLE_OUTPUT_PATH
${
CMAKE_CURRENT_SOURCE_DIR
}
/bin
)
SET
(
EXECUTABLE_OUTPUT_PATH
${
CMAKE_CURRENT_SOURCE_DIR
}
/bin
)
...
@@ -245,7 +246,7 @@ SET(SRCS_YAML
...
@@ -245,7 +246,7 @@ SET(SRCS_YAML
# ENDIF(Ceres_FOUND)
# ENDIF(Ceres_FOUND)
# create the shared library
# create the shared library
ADD_LIBRARY
(
${
P
ROJECT
_NAME
}
ADD_LIBRARY
(
${
P
LUGIN
_NAME
}
SHARED
SHARED
${
SRCS_BASE
}
${
SRCS_BASE
}
${
SRCS_CAPTURE
}
${
SRCS_CAPTURE
}
...
@@ -262,24 +263,24 @@ ADD_LIBRARY(${PROJECT_NAME}
...
@@ -262,24 +263,24 @@ ADD_LIBRARY(${PROJECT_NAME}
${
SRCS_WRAPPER
}
${
SRCS_WRAPPER
}
${
SRCS_YAML
}
${
SRCS_YAML
}
)
)
TARGET_LINK_LIBRARIES
(
${
P
ROJECT
_NAME
}
${
CMAKE_THREAD_LIBS_INIT
}
)
TARGET_LINK_LIBRARIES
(
${
P
LUGIN
_NAME
}
${
CMAKE_THREAD_LIBS_INIT
}
)
#Link the created libraries
#Link the created libraries
#===============EXAMPLE=========================
#===============EXAMPLE=========================
# IF (Ceres_FOUND)
# IF (Ceres_FOUND)
# TARGET_LINK_LIBRARIES(${P
ROJECT
_NAME} ${CERES_LIBRARIES})
# TARGET_LINK_LIBRARIES(${P
LUGIN
_NAME} ${CERES_LIBRARIES})
# ENDIF(Ceres_FOUND)
# ENDIF(Ceres_FOUND)
#Build tests
#Build tests
#===============EXAMPLE=========================
#===============EXAMPLE=========================
IF
(
GLOG_FOUND
)
IF
(
GLOG_FOUND
)
TARGET_LINK_LIBRARIES
(
${
P
ROJECT
_NAME
}
${
GLOG_LIBRARY
}
)
TARGET_LINK_LIBRARIES
(
${
P
LUGIN
_NAME
}
${
GLOG_LIBRARY
}
)
ENDIF
(
GLOG_FOUND
)
ENDIF
(
GLOG_FOUND
)
#check if this is done correctly
#check if this is done correctly
IF
(
OPENCV_FOUND AND Apriltag_FOUND
)
IF
(
OPENCV_FOUND AND Apriltag_FOUND
)
LINK_LIBRARIES
(
apriltag m
)
LINK_LIBRARIES
(
apriltag m
)
TARGET_LINK_LIBRARIES
(
${
P
ROJECT
_NAME
}
${
APRILTAG_LIBRARY
}
${
CMAKE_THREAD_LIBS_INIT
}
${
OPENCV_LDFLAGS
}
m
)
TARGET_LINK_LIBRARIES
(
${
P
LUGIN
_NAME
}
${
APRILTAG_LIBRARY
}
${
CMAKE_THREAD_LIBS_INIT
}
${
OPENCV_LDFLAGS
}
m
)
ENDIF
(
OPENCV_FOUND AND Apriltag_FOUND
)
ENDIF
(
OPENCV_FOUND AND Apriltag_FOUND
)
IF
(
GLOG_FOUND
)
IF
(
GLOG_FOUND
)
...
@@ -292,12 +293,12 @@ ENDIF (GLOG_FOUND)
...
@@ -292,12 +293,12 @@ ENDIF (GLOG_FOUND)
#install library
#install library
#=============================================================
#=============================================================
INSTALL
(
TARGETS
${
P
ROJECT
_NAME
}
EXPORT
${
P
ROJECT
_NAME
}
Targets
INSTALL
(
TARGETS
${
P
LUGIN
_NAME
}
EXPORT
${
P
LUGIN
_NAME
}
Targets
RUNTIME DESTINATION bin
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib/iri-algorithms
LIBRARY DESTINATION lib/iri-algorithms
ARCHIVE DESTINATION lib/iri-algorithms
)
ARCHIVE DESTINATION lib/iri-algorithms
)
install
(
EXPORT
${
P
ROJECT
_NAME
}
Targets DESTINATION lib/cmake/
${
P
ROJECT
_NAME
}
)
install
(
EXPORT
${
P
LUGIN
_NAME
}
Targets DESTINATION lib/cmake/
${
P
LUGIN
_NAME
}
)
#install headers
#install headers
INSTALL
(
FILES
${
HDRS_DTASSC
}
INSTALL
(
FILES
${
HDRS_DTASSC
}
DESTINATION include/iri-algorithms/wolf/plugin_
${
PROJECT_NAME
}
/
${
PROJECT_NAME
}
/association
)
DESTINATION include/iri-algorithms/wolf/plugin_
${
PROJECT_NAME
}
/
${
PROJECT_NAME
}
/association
)
...
@@ -332,24 +333,15 @@ INSTALL(FILES ${HDRS_YAML}
...
@@ -332,24 +333,15 @@ INSTALL(FILES ${HDRS_YAML}
INSTALL
(
FILES
${
PROJECT_NAME
}
.found
INSTALL
(
FILES
${
PROJECT_NAME
}
.found
DESTINATION include/iri-algorithms/wolf/plugin_
${
PROJECT_NAME
}
)
DESTINATION include/iri-algorithms/wolf/plugin_
${
PROJECT_NAME
}
)
INSTALL
(
FILES
"
${
CMAKE_SOURCE_DIR
}
/cmake_modules/Findwolf
${
PROJECT_NAME
}
.cmake"
DESTINATION
"lib/cmake/wolf
${
PROJECT_NAME
}
"
)
FILE
(
WRITE IMU.found
""
)
FILE
(
WRITE IMU.found
""
)
#install Find*.cmake
configure_file
(
"
${
CMAKE_SOURCE_DIR
}
/cmake_modules/wolf
${
PROJECT_NAME
}
Config.cmake"
"
${
CMAKE_BINARY_DIR
}
/wolf
${
PROJECT_NAME
}
Config.cmake"
@ONLY
)
# configure_file("${CMAKE_SOURCE_DIR}/cmake_modules/Findwolf${PROJECT_NAME}.cmake"
# "${CMAKE_BINARY_DIR}/Findwolf${PROJECT_NAME}.cmake" @ONLY)
INSTALL
(
FILES
"
${
WOLF_CONFIG_DIR
}
/config.h"
INSTALL
(
FILES
"
${
WOLF_CONFIG_DIR
}
/config.h"
DESTINATION include/iri-algorithms/wolf/internal
)
DESTINATION include/iri-algorithms/wolf/internal
)
# INSTALL(FILES "${CMAKE_BINARY_DIR}/cmake_modules/Findwolf${PROJECT_NAME}.cmake"
INSTALL
(
FILES
"
${
CMAKE_SOURCE_DIR
}
/cmake_modules/
${
PLUGIN_NAME
}
Config.cmake"
DESTINATION
"lib/cmake/
${
PLUGIN_NAME
}
"
)
# DESTINATION "lib/cmake/${PROJECT_NAME}")
INSTALL
(
FILES
"
${
CMAKE_BINARY_DIR
}
/wolf
${
PROJECT_NAME
}
Config.cmake"
DESTINATION
"lib/cmake/wolf
${
PROJECT_NAME
}
"
)
INSTALL
(
DIRECTORY
${
SPDLOG_INCLUDE_DIRS
}
DESTINATION
"include/iri-algorithms/"
)
INSTALL
(
DIRECTORY
${
SPDLOG_INCLUDE_DIRS
}
DESTINATION
"include/iri-algorithms/"
)
export
(
PACKAGE
wolf_
${
PROJECT
_NAME
}
)
export
(
PACKAGE
${
PLUGIN
_NAME
}
)
FIND_PACKAGE
(
Doxygen
)
FIND_PACKAGE
(
Doxygen
)
...
...
This diff is collapsed.
Click to expand it.
cmake_modules/wolfIMUConfig.cmake
+
48
−
205
View file @
64ac5d59
# This file was copied and adapted from the ceres_solver project
#edit the following line to add the librarie's header files
# http://ceres-solver.org/
FIND_PATH
(
wolfIMU_INCLUDE_DIR
NAMES IMU.found
PATHS /usr/local/include/iri-algorithms/wolf/plugin_IMU
)
IF
(
wolfIMU_INCLUDE_DIR
)
MESSAGE
(
"Found wolf IMU include dirs:
${
wolfIMU_INCLUDE_DIR
}
"
)
ELSE
(
wolfIMU_INCLUDE_DIR
)
MESSAGE
(
"Couldn't find wolf IMU include dirs"
)
ENDIF
(
wolfIMU_INCLUDE_DIR
)
FIND_LIBRARY
(
wolfIMU_LIBRARY
NAMES libwolfIMU.so
PATHS /usr/local/lib/iri-algorithms
)
IF
(
wolfIMU_LIBRARY
)
MESSAGE
(
"Found wolf IMU lib:
${
wolfIMU_LIBRARY
}
"
)
ELSE
(
wolfIMU_LIBRARY
)
MESSAGE
(
"Couldn't find wolf IMU lib"
)
ENDIF
(
wolfIMU_LIBRARY
)
IF
(
wolfIMU_INCLUDE_DIR AND wolfIMU_LIBRARY
)
SET
(
wolfIMU_FOUND TRUE
)
ELSE
(
wolfIMU_INCLUDE_DIR AND wolfIMU_LIBRARY
)
set
(
wolfIMU_FOUND FALSE
)
ENDIF
(
wolfIMU_INCLUDE_DIR AND wolfIMU_LIBRARY
)
IF
(
wolfIMU_FOUND
)
IF
(
NOT wolfIMU_FIND_QUIETLY
)
MESSAGE
(
STATUS
"Found wolf IMU:
${
wolfIMU_LIBRARY
}
"
)
ENDIF
(
NOT wolfIMU_FIND_QUIETLY
)
ELSE
(
wolfIMU_FOUND
)
IF
(
wolfIMU_FIND_REQUIRED
)
MESSAGE
(
FATAL_ERROR
"Could not find wolf IMU"
)
ENDIF
(
wolfIMU_FIND_REQUIRED
)
ENDIF
(
wolfIMU_FOUND
)
# wolf - Windowed Localization Frames
# Copyright 2016
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Google Inc. nor the names of its contributors may be
# used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# Authors:
#
# Config file for wolf - Find wolf & dependencies.
#
# This file is used by CMake when find_package(wolf) is invoked and either
# the directory containing this file either is present in CMAKE_MODULE_PATH
# (if wolf was installed), or exists in the local CMake package registry if
# the wolf build directory was exported.
#
# This module defines the following variables:
#
# wolf_FOUND / wolf_FOUND: True if wolf has been successfully
# found. Both variables are set as although
# FindPackage() only references wolf_FOUND
# in Config mode, given the conventions for
# <package>_FOUND when FindPackage() is
# called in Module mode, users could
# reasonably expect to use wolf_FOUND
# instead.
#
# wolf_VERSION: Version of wolf found.
#
# wolf_INCLUDE_DIRS: Include directories for wolf and the
# dependencies which appear in the wolf public
# API and are thus required to use wolf.
#
# wolf_LIBRARIES: Libraries for wolf and all
# dependencies against which wolf was
# compiled. This will not include any optional
# dependencies that were disabled when wolf was
# compiled.
#
# The following variables are also defined for legacy compatibility
# only. Any new code should not use them as they do not conform to
# the standard CMake FindPackage naming conventions.
#
# wolf_INCLUDES = ${wolf_INCLUDE_DIRS}.
# Called if we failed to find Ceres or any of its required dependencies,
# unsets all public (designed to be used externally) variables and reports
# error message at priority depending upon [REQUIRED/QUIET/<NONE>] argument.
macro
(
wolf_report_not_found REASON_MSG
)
macro
(
wolf_report_not_found REASON_MSG
)
# FindPackage() only references Ceres_FOUND, and requires it to be
set
(
wolfIMU_FOUND FALSE
)
# explicitly set FALSE to denote not found (not merely undefined).
unset
(
wolfIMU_INCLUDE_DIR
)
set
(
wolf_FOUND FALSE
)
unset
(
wolfIMU_LIBRARIES
)
set
(
wolf_FOUND FALSE
)
unset
(
wolf_INCLUDE_DIRS
)
unset
(
wolf_LIBRARIES
)
# Reset the CMake module path to its state when this script was called.
# Reset the CMake module path to its state when this script was called.
set
(
CMAKE_MODULE_PATH
${
CALLERS_CMAKE_MODULE_PATH
}
)
set
(
CMAKE_MODULE_PATH
${
CALLERS_CMAKE_MODULE_PATH
}
)
# Note <package>_FIND_[REQUIRED/QUIETLY] variables defined by
# Note <package>_FIND_[REQUIRED/QUIETLY] variables defined by
# FindPackage() use the camelcase library name, not uppercase.
# FindPackage() use the camelcase library name, not uppercase.
if
(
wolf_FIND_QUIETLY
)
if
(
wolf
IMU
_FIND_QUIETLY
)
message
(
STATUS
"Failed to find wolf - "
${
REASON_MSG
}
${
ARGN
}
)
message
(
STATUS
"Failed to find wolf
IMU
- "
${
REASON_MSG
}
${
ARGN
}
)
else
(
wolf_FIND_REQUIRED
)
else
(
wolf
IMU
_FIND_REQUIRED
)
message
(
FATAL_ERROR
"Failed to find wolf - "
${
REASON_MSG
}
${
ARGN
}
)
message
(
FATAL_ERROR
"Failed to find wolf
IMU
- "
${
REASON_MSG
}
${
ARGN
}
)
else
()
else
()
# Neither QUIETLY nor REQUIRED, use SEND_ERROR which emits an error
# Neither QUIETLY nor REQUIRED, use SEND_ERROR which emits an error
# that prevents generation, but continues configuration.
# that prevents generation, but continues configuration.
message
(
SEND_ERROR
"Failed to find wolf - "
${
REASON_MSG
}
${
ARGN
}
)
message
(
SEND_ERROR
"Failed to find wolf
IMU
- "
${
REASON_MSG
}
${
ARGN
}
)
endif
()
endif
()
return
()
return
()
endmacro
(
wolf_report_not_found
)
endmacro
(
wolf_report_not_found
)
# Record the state of the CMake module path when this script was
if
(
NOT wolfIMU_FOUND
)
# called so that we can ensure that we leave it in the same state on
wolf_report_not_found
(
"TROUBLE DUDE."
)
# exit as it was on entry, but modify it locally.
endif
(
NOT wolfIMU_FOUND
)
set
(
CALLERS_CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
)
# Get the (current, i.e. installed) directory containing this file.
get_filename_component
(
wolf_CURRENT_CONFIG_DIR
"
${
CMAKE_CURRENT_LIST_FILE
}
"
PATH
)
# Reset CMake module path to the installation directory of this
# script, thus we will use the FindPackage() scripts shipped with
# wolf to find wolf' dependencies, even if the user has equivalently
# named FindPackage() scripts in their project.
set
(
CMAKE_MODULE_PATH
${
wolf_CURRENT_CONFIG_DIR
}
)
# Build the absolute root install directory as a relative path
# (determined when wolf was configured & built) from the current
# install directory for this this file. This allows for the install
# tree to be relocated, after wolf was built, outside of CMake.
get_filename_component
(
CURRENT_ROOT_INSTALL_DIR
${
wolf_CURRENT_CONFIG_DIR
}
/../../../
ABSOLUTE
)
if
(
NOT EXISTS
${
CURRENT_ROOT_INSTALL_DIR
}
)
wolf_report_not_found
(
"wolf install root:
${
CURRENT_ROOT_INSTALL_DIR
}
, "
"determined from relative path from wolfConfig.cmake install location: "
"
${
wolf_CURRENT_CONFIG_DIR
}
, does not exist. Either the install "
"directory was deleted, or the install tree was only partially relocated "
"outside of CMake after wolf was built."
)
endif
(
NOT EXISTS
${
CURRENT_ROOT_INSTALL_DIR
}
)
# Set the include directories for wolf (itself).
# Set the include directories for wolf (itself).
set
(
wolf_INCLUDE_DIR
"
${
CURRENT_ROOT_INSTALL_DIR
}
/include/iri-algorithms"
)
set
(
wolfIMU_FOUND TRUE
)
\ No newline at end of file
# if (NOT EXISTS ${wolf_INCLUDE_DIR}/wolf/wolf.h)
if
(
NOT EXISTS
${
wolf_INCLUDE_DIR
}
/wolf
)
wolf_report_not_found
(
"wolf install root:
${
CURRENT_ROOT_INSTALL_DIR
}
, "
"determined from relative path from wolfConfig.cmake install location: "
"
${
wolf_CURRENT_CONFIG_DIR
}
, does not contain wolf headers. "
"Either the install directory was deleted, or the install tree was only "
"partially relocated outside of CMake after wolf was built."
)
# endif (NOT EXISTS ${wolf_INCLUDE_DIR}/wolf/wolf.h)
endif
(
NOT EXISTS
${
wolf_INCLUDE_DIR
}
/wolf
)
list
(
APPEND wolf_INCLUDE_DIRS
${
wolf_INCLUDE_DIR
}
/wolf
)
# Set the version.
set
(
wolf_VERSION 0.0.1
)
# Eigen.
# Flag set during configuration and build of wolf.
set
(
wolf_EIGEN_VERSION @EIGEN_VERSION@
)
# Append the locations of Eigen when wolf was built to the search path hints.
list
(
APPEND EIGEN_INCLUDE_DIR_HINTS /usr/include/eigen3
)
# Search quietly to control the timing of the error message if not found. The
# search should be for an exact match, but for usability reasons do a soft
# match and reject with an explanation below.
find_package
(
Eigen3
${
wolf_EIGEN_VERSION
}
QUIET
)
# Flag set with currently found Eigen version.
set
(
EIGEN_VERSION @EIGEN_VERSION@
)
if
(
EIGEN3_FOUND
)
if
(
NOT EIGEN_VERSION VERSION_EQUAL wolf_EIGEN_VERSION
)
# CMake's VERSION check in FIND_PACKAGE() will accept any version >= the
# specified version. However, only version = is supported. Improve
# usability by explaining why we don't accept non-exact version matching.
wolf_report_not_found
(
"Found Eigen dependency, but the version of Eigen "
"found (
${
EIGEN_VERSION
}
) does not exactly match the version of Eigen "
"wolf was compiled with (
${
wolf_EIGEN_VERSION
}
). This can cause subtle "
"bugs by triggering violations of the One Definition Rule. See the "
"Wikipedia article http://en.wikipedia.org/wiki/One_Definition_Rule "
"for more details"
)
endif
()
message
(
STATUS
"Found required wolf dependency: "
"Eigen version
${
wolf_EIGEN_VERSION
}
in
${
EIGEN3_INCLUDE_DIR
}
"
)
else
(
EIGEN3_FOUND
)
wolf_report_not_found
(
"Missing required wolf "
"dependency: Eigen version
${
wolf_EIGEN_VERSION
}
, please set "
"EIGEN3_INCLUDE_DIR."
)
endif
(
EIGEN3_FOUND
)
list
(
APPEND wolf_INCLUDE_DIRS
${
EIGEN3_INCLUDE_DIR
}
)
# Import exported wolf targets, if they have not already been imported.
if
(
NOT TARGET wolf AND NOT wolf_BINARY_DIR
)
include
(
${
wolf_CURRENT_CONFIG_DIR
}
/wolfTargets.cmake
)
endif
(
NOT TARGET wolf AND NOT wolf_BINARY_DIR
)
# Set the expected XX_LIBRARIES variable for FindPackage().
set
(
wolf_LIBRARIES wolf
)
# Set legacy library variable for backwards compatibility.
set
(
wolf_LIBRARY
${
wolf_LIBRARIES
}
)
# Make user aware of any compile flags that will be added to their targets
# which use wolf (i.e. flags exported in the wolf target). Only CMake
# versions >= 2.8.12 support target_compile_options().
if
(
TARGET
${
wolf_LIBRARIES
}
AND
NOT CMAKE_VERSION VERSION_LESS
"2.8.12"
)
get_target_property
(
wolf_INTERFACE_COMPILE_OPTIONS
${
wolf_LIBRARIES
}
INTERFACE_COMPILE_OPTIONS
)
set
(
wolf_LOCATION
"
${
CURRENT_ROOT_INSTALL_DIR
}
"
)
# Check for -std=c++11 flags.
if
(
wolf_INTERFACE_COMPILE_OPTIONS MATCHES
".*std=c
\\
+
\\
+11.*"
)
message
(
STATUS
"wolf version
${
wolf_VERSION
}
detected here: "
"
${
wolf_LOCATION
}
was built with C++11. wolf target will add "
"C++11 flags to compile options for targets using it."
)
endif
()
endif
()
# Reset CMake module path to its state when this script was called.
set
(
CMAKE_MODULE_PATH
${
CALLERS_CMAKE_MODULE_PATH
}
)
# As we use wolf_REPORT_NOT_FOUND() to abort, if we reach this point we have
# found wolf and all required dependencies.
message
(
STATUS
"Found wolf version:
${
wolf_VERSION
}
installed in:
${
CURRENT_ROOT_INSTALL_DIR
}
"
)
# Set wolf_FOUND to be equivalent to wolf_FOUND, which is set to
# TRUE by FindPackage() if this file is found and run, and after which
# wolf_FOUND is not (explicitly, i.e. undefined does not count) set
# to FALSE.
set
(
wolf_FOUND TRUE
)
This diff is collapsed.
Click to expand it.
test/CMakeLists.txt
+
7
−
7
View file @
64ac5d59
...
@@ -9,26 +9,26 @@ include_directories(${GTEST_INCLUDE_DIRS})
...
@@ -9,26 +9,26 @@ include_directories(${GTEST_INCLUDE_DIRS})
# #
# #
# Create a specific test executable for gtest_example #
# Create a specific test executable for gtest_example #
wolf_add_gtest
(
gtest_example gtest_example.cpp
)
#
wolf_add_gtest
(
gtest_example gtest_example.cpp
)
#
target_link_libraries
(
gtest_example
${
P
ROJECT
_NAME
}
)
#
target_link_libraries
(
gtest_example
${
P
LUGIN
_NAME
}
)
#
# #
# #
###########################################################
###########################################################
wolf_add_gtest
(
gtest_processor_IMU gtest_processor_IMU.cpp
)
wolf_add_gtest
(
gtest_processor_IMU gtest_processor_IMU.cpp
)
target_link_libraries
(
gtest_processor_IMU
${
P
ROJECT
_NAME
}
${
wolf_LIBRARY
}
)
target_link_libraries
(
gtest_processor_IMU
${
P
LUGIN
_NAME
}
${
wolf_LIBRARY
}
)
wolf_add_gtest
(
gtest_IMU gtest_IMU.cpp
)
wolf_add_gtest
(
gtest_IMU gtest_IMU.cpp
)
target_link_libraries
(
gtest_IMU
${
P
ROJECT
_NAME
}
${
wolf_LIBRARY
}
)
target_link_libraries
(
gtest_IMU
${
P
LUGIN
_NAME
}
${
wolf_LIBRARY
}
)
wolf_add_gtest
(
gtest_IMU_tools gtest_IMU_tools.cpp
)
wolf_add_gtest
(
gtest_IMU_tools gtest_IMU_tools.cpp
)
target_link_libraries
(
gtest_IMU_tools
${
P
ROJECT
_NAME
}
${
wolf_LIBRARY
}
)
target_link_libraries
(
gtest_IMU_tools
${
P
LUGIN
_NAME
}
${
wolf_LIBRARY
}
)
wolf_add_gtest
(
gtest_processor_IMU_jacobians gtest_processor_IMU_jacobians.cpp
)
wolf_add_gtest
(
gtest_processor_IMU_jacobians gtest_processor_IMU_jacobians.cpp
)
target_link_libraries
(
gtest_processor_IMU_jacobians
${
P
ROJECT
_NAME
}
${
wolf_LIBRARY
}
)
target_link_libraries
(
gtest_processor_IMU_jacobians
${
P
LUGIN
_NAME
}
${
wolf_LIBRARY
}
)
wolf_add_gtest
(
gtest_feature_IMU gtest_feature_IMU.cpp
)
wolf_add_gtest
(
gtest_feature_IMU gtest_feature_IMU.cpp
)
target_link_libraries
(
gtest_feature_IMU
${
P
ROJECT
_NAME
}
${
wolf_LIBRARY
}
)
target_link_libraries
(
gtest_feature_IMU
${
P
LUGIN
_NAME
}
${
wolf_LIBRARY
}
)
# Has been excluded from tests for god knows how long, so thing is broken.
# Has been excluded from tests for god knows how long, so thing is broken.
# Maybe call an archeologist to fix this thing?
# Maybe call an archeologist to fix this thing?
# wolf_add_gtest(gtest_factor_IMU gtest_factor_IMU.cpp)
# wolf_add_gtest(gtest_factor_IMU gtest_factor_IMU.cpp)
# target_link_libraries(gtest_factor_IMU ${P
ROJECT
_NAME} ${wolf_LIBRARY})
# target_link_libraries(gtest_factor_IMU ${P
LUGIN
_NAME} ${wolf_LIBRARY})
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment