Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,13 @@ ELSE()
OPTION(BUILD_POSITION_INDEPENDENT_CODE "Build position independent code (-fPIC)" ON)
ENDIF()

set(CMAKE_CXX_STANDARD 11 CACHE STRING "The C++ standard used by the project")
set(CMAKE_CXX_STANDARD_REQUIRED ON)

IF(MSVC)
add_compile_options(/wd4514 /wd4267 /bigobj)
add_definitions(-D_USE_MATH_DEFINES)
ELSE()
IF (CMAKE_SYSTEM_PROCESSOR MATCHES "(arm64)|(ARM64)|(aarch64)|(AARCH64)")
add_definitions (-march=armv8-a)
ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES
"(arm)|(ARM)|(armhf)|(ARMHF)|(armel)|(ARMEL)")
add_definitions (-march=armv7-a)
ELSE ()
add_definitions (-march=native) #TODO use correct c++11 def once everybody has moved to gcc 4.7 # for now I even removed std=gnu++0x
ENDIF()
add_definitions (
-O3
-Wall
Expand Down Expand Up @@ -181,8 +176,6 @@ add_library( random_generators test/random_generators.cpp test/random_generators
set_target_properties( opengv random_generators PROPERTIES
SOVERSION ${PROJECT_VERSION}
VERSION ${PROJECT_VERSION}
CXX_STANDARD 11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing at line 333 below for the tests

CXX_STANDARD_REQUIRED ON
DEBUG_POSTFIX d )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
DEBUG_POSTFIX d )
)

For DEBUG_POSTFIXwe can just set a cache variable that initialize CMAKE_DEBUG_POSTFIX that will automatically set it for all targets, without doing it explicitly:

set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "The postfix to use for the debug version of the target names")


target_include_directories( opengv PUBLIC
Expand Down
1 change: 1 addition & 0 deletions src/absolute_pose/CentralAbsoluteAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

#include <opengv/absolute_pose/CentralAbsoluteAdapter.hpp>

#include <cassert>

opengv::absolute_pose::CentralAbsoluteAdapter::CentralAbsoluteAdapter(
const bearingVectors_t & bearingVectors,
Expand Down
1 change: 1 addition & 0 deletions src/absolute_pose/MACentralAbsolute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

#include <opengv/absolute_pose/MACentralAbsolute.hpp>

#include <cassert>

opengv::absolute_pose::MACentralAbsolute::MACentralAbsolute(
const double * points,
Expand Down
2 changes: 2 additions & 0 deletions src/absolute_pose/MANoncentralAbsolute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

#include <opengv/absolute_pose/MANoncentralAbsolute.hpp>

#include <cassert>

opengv::absolute_pose::MANoncentralAbsolute::MANoncentralAbsolute(
const double * points,
const double * bearingVectors,
Expand Down
2 changes: 2 additions & 0 deletions src/absolute_pose/NoncentralAbsoluteAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

#include <opengv/absolute_pose/NoncentralAbsoluteAdapter.hpp>

#include <cassert>

opengv::absolute_pose::NoncentralAbsoluteAdapter::NoncentralAbsoluteAdapter(
const bearingVectors_t & bearingVectors,
const camCorrespondences_t & camCorrespondences,
Expand Down
2 changes: 2 additions & 0 deletions src/absolute_pose/NoncentralAbsoluteMultiAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

#include <opengv/absolute_pose/NoncentralAbsoluteMultiAdapter.hpp>

#include <cassert>

opengv::absolute_pose::NoncentralAbsoluteMultiAdapter::NoncentralAbsoluteMultiAdapter(
std::vector<std::shared_ptr<bearingVectors_t> > bearingVectors,
std::vector<std::shared_ptr<points_t> > points,
Expand Down
1 change: 1 addition & 0 deletions src/absolute_pose/methods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include <opengv/math/quaternion.hpp>
#include <opengv/math/roots.hpp>

#include <cassert>
#include <iostream>

opengv::translation_t
Expand Down
2 changes: 2 additions & 0 deletions src/absolute_pose/modules/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
#include <opengv/math/arun.hpp>
#include <opengv/math/cayley.hpp>

#include <cassert>

void
opengv::absolute_pose::modules::p3p_kneip_main(
const bearingVectors_t & f,
Expand Down
2 changes: 2 additions & 0 deletions src/math/arun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

#include <opengv/math/arun.hpp>

#include <cassert>

opengv::rotation_t
opengv::math::arun( const Eigen::MatrixXd & Hcross )
{
Expand Down
2 changes: 2 additions & 0 deletions src/point_cloud/MAPointCloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

#include <opengv/point_cloud/MAPointCloud.hpp>

#include <cassert>

opengv::point_cloud::MAPointCloud::MAPointCloud(
const double * points1,
const double * points2,
Expand Down
2 changes: 2 additions & 0 deletions src/point_cloud/PointCloudAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

#include <opengv/point_cloud/PointCloudAdapter.hpp>

#include <cassert>

opengv::point_cloud::PointCloudAdapter::PointCloudAdapter(
const points_t & points1,
const points_t & points2 ) :
Expand Down
2 changes: 2 additions & 0 deletions src/point_cloud/methods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
#include <opengv/math/arun.hpp>
#include <opengv/math/cayley.hpp>

#include <cassert>

namespace opengv
{
namespace point_cloud
Expand Down
2 changes: 2 additions & 0 deletions src/relative_pose/CentralRelativeAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

#include <opengv/relative_pose/CentralRelativeAdapter.hpp>

#include <cassert>

opengv::relative_pose::CentralRelativeAdapter::CentralRelativeAdapter(
const bearingVectors_t & bearingVectors1,
const bearingVectors_t & bearingVectors2 ) :
Expand Down
2 changes: 2 additions & 0 deletions src/relative_pose/CentralRelativeMultiAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

#include <opengv/relative_pose/CentralRelativeMultiAdapter.hpp>

#include <cassert>

opengv::relative_pose::CentralRelativeMultiAdapter::CentralRelativeMultiAdapter(
std::vector<std::shared_ptr<bearingVectors_t> > bearingVectors1,
std::vector<std::shared_ptr<bearingVectors_t> > bearingVectors2 ) :
Expand Down
2 changes: 2 additions & 0 deletions src/relative_pose/CentralRelativeWeightingAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

#include <opengv/relative_pose/CentralRelativeWeightingAdapter.hpp>

#include <cassert>

opengv::relative_pose::CentralRelativeWeightingAdapter::CentralRelativeWeightingAdapter(
const bearingVectors_t & bearingVectors1,
const bearingVectors_t & bearingVectors2,
Expand Down
2 changes: 2 additions & 0 deletions src/relative_pose/MACentralRelative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

#include <opengv/relative_pose/MACentralRelative.hpp>

#include <cassert>

opengv::relative_pose::MACentralRelative::MACentralRelative(
const double * bearingVectors1,
const double * bearingVectors2,
Expand Down
2 changes: 2 additions & 0 deletions src/relative_pose/MANoncentralRelative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

#include <opengv/relative_pose/MANoncentralRelative.hpp>

#include <cassert>

opengv::relative_pose::MANoncentralRelative::MANoncentralRelative(
const double * bearingVectors1,
const double * bearingVectors2,
Expand Down
2 changes: 2 additions & 0 deletions src/relative_pose/MANoncentralRelativeMulti.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

#include <opengv/relative_pose/MANoncentralRelativeMulti.hpp>

#include <cassert>

opengv::relative_pose::MANoncentralRelativeMulti::MANoncentralRelativeMulti(
const std::vector<double*> & bearingVectors1,
const std::vector<double*> & bearingVectors2,
Expand Down
2 changes: 2 additions & 0 deletions src/relative_pose/NoncentralRelativeAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

#include <opengv/relative_pose/NoncentralRelativeAdapter.hpp>

#include <cassert>

opengv::relative_pose::NoncentralRelativeAdapter::NoncentralRelativeAdapter(
const bearingVectors_t & bearingVectors1,
const bearingVectors_t & bearingVectors2,
Expand Down
2 changes: 2 additions & 0 deletions src/relative_pose/NoncentralRelativeMultiAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

#include <opengv/relative_pose/NoncentralRelativeMultiAdapter.hpp>

#include <cassert>

opengv::relative_pose::NoncentralRelativeMultiAdapter::NoncentralRelativeMultiAdapter(
std::vector<std::shared_ptr<bearingVectors_t> > bearingVectors1,
std::vector<std::shared_ptr<bearingVectors_t> > bearingVectors2,
Expand Down
1 change: 1 addition & 0 deletions src/relative_pose/methods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include <opengv/relative_pose/modules/main.hpp>
#include <opengv/triangulation/methods.hpp>

#include <cassert>
#include <iostream>

opengv::translation_t
Expand Down
2 changes: 2 additions & 0 deletions src/relative_pose/modules/fivept_nister/modules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@

#include <opengv/OptimizationFunctor.hpp>

#include <cassert>

void
opengv::relative_pose::modules::fivept_nister::composeA(
const Eigen::Matrix<double,9,4> & EE,
Expand Down