Merge branch 'warnings' into 'master'
Warnings and ci See merge request basalt/basalt!41
This commit is contained in:
commit
1e7eb7e0b1
|
@ -211,6 +211,24 @@ mojave-relwithdebinfo-compile:
|
|||
variables:
|
||||
BUILD_TYPE: CiRelWithDebInfo
|
||||
|
||||
catalina-relwithdebinfo-compile:
|
||||
<<: *compile_test_definition
|
||||
tags: [macos, "10.15"]
|
||||
only:
|
||||
- master
|
||||
variables:
|
||||
BUILD_TYPE: CiRelWithDebInfo
|
||||
|
||||
catalina-brewclang-relwithdebinfo-compile:
|
||||
<<: *compile_test_definition
|
||||
tags: [macos, "10.15"]
|
||||
only:
|
||||
- master
|
||||
variables:
|
||||
BUILD_TYPE: CiRelWithDebInfo
|
||||
CC: /usr/local/opt/llvm/bin/clang
|
||||
CXX: /usr/local/opt/llvm/bin/clang++
|
||||
|
||||
# check if clang-format would make any changes
|
||||
clang-format:
|
||||
tags:
|
||||
|
|
|
@ -104,7 +104,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "App
|
|||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
|
||||
# These are disabled to avoid lot's of warnings in Eigen code with clang 10
|
||||
set(BASALT_CXX_FLAGS "${BASALT_HEADERS_CXX_FLAGS} -Wno-error=misleading-indentation -Wno-error=deprecated-copy")
|
||||
set(BASALT_CXX_FLAGS "${BASALT_CXX_FLAGS} -Wno-misleading-indentation -Wno-error=deprecated-copy")
|
||||
endif()
|
||||
|
||||
# - Added TBB_USE_GLIBCXX_VERSION macro to specify the version of GNU
|
||||
|
@ -121,7 +121,7 @@ else()
|
|||
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9)
|
||||
# These are disabled to avoid lot's of warnings in Eigen code with gcc-9
|
||||
set(BASALT_CXX_FLAGS "${BASALT_HEADERS_CXX_FLAGS} -Wno-error=deprecated-copy")
|
||||
set(BASALT_CXX_FLAGS "${BASALT_CXX_FLAGS} -Wno-error=deprecated-copy")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
|
@ -46,8 +46,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <opengv/relative_pose/methods.hpp>
|
||||
|
||||
#include <opengv/sac/Ransac.hpp>
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#include <opengv/sac_problems/absolute_pose/AbsolutePoseSacProblem.hpp>
|
||||
#include <opengv/sac_problems/relative_pose/CentralRelativePoseSacProblem.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include <opencv2/calib3d/calib3d.hpp>
|
||||
|
||||
|
@ -65,7 +69,9 @@ bool estimateTransformation(
|
|||
|
||||
for (size_t i = 0; i < corners.size(); i++) {
|
||||
Eigen::Vector4d tmp;
|
||||
cam_calib.unproject(corners[i], tmp);
|
||||
if (!cam_calib.unproject(corners[i], tmp)) {
|
||||
continue;
|
||||
}
|
||||
Eigen::Vector3d bearing = tmp.head<3>();
|
||||
Eigen::Vector3d point = aprilgrid_corner_pos_3d[corner_ids[i]].head<3>();
|
||||
bearing.normalize();
|
||||
|
|
|
@ -486,7 +486,8 @@ void CamCalib::initCamIntrinsics() {
|
|||
for (size_t j = 0; j < vio_dataset->get_num_cams(); j++) {
|
||||
if (!cam_initialized[j]) {
|
||||
std::vector<CalibCornerData *> pinhole_corners;
|
||||
int w, h;
|
||||
int w = 0;
|
||||
int h = 0;
|
||||
|
||||
for (size_t i = 0; i < vio_dataset->get_image_timestamps().size();
|
||||
i += inc) {
|
||||
|
@ -507,6 +508,8 @@ void CamCalib::initCamIntrinsics() {
|
|||
h = img_vec[j].img->h;
|
||||
}
|
||||
|
||||
BASALT_ASSERT(w > 0 && h > 0);
|
||||
|
||||
Eigen::Vector4d init_intr;
|
||||
|
||||
bool success = CalibHelper::initializeIntrinsicsPinhole(
|
||||
|
|
|
@ -43,7 +43,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <opengv/relative_pose/CentralRelativeAdapter.hpp>
|
||||
#include <opengv/relative_pose/methods.hpp>
|
||||
#include <opengv/sac/Ransac.hpp>
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#include <opengv/sac_problems/relative_pose/CentralRelativePoseSacProblem.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
namespace basalt {
|
||||
|
||||
|
|
|
@ -79,6 +79,16 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION
|
|||
target_compile_options(pangolin PRIVATE "-Wno-defaulted-function-deleted")
|
||||
endif()
|
||||
|
||||
# fix pangolin: clang >= 10.0
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0.0)
|
||||
target_compile_options(pangolin PRIVATE "-Wno-deprecated-copy")
|
||||
endif()
|
||||
|
||||
# fix pangolin: GCC >= 9.0
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.0)
|
||||
target_compile_options(pangolin PRIVATE "-Wno-stringop-truncation;-Wno-deprecated-copy")
|
||||
endif()
|
||||
|
||||
# check here the directories for the pangolin and opengv targets, and
|
||||
# confirm that the eigen-related include dirs match.
|
||||
foreach(_target opengv pangolin)
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
cmake_minimum_required(VERSION 3.2)
|
||||
|
||||
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wno-unused-parameter -Wno-deprecated-declarations")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wno-deprecated-declarations")
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-catch-value")
|
||||
endif()
|
||||
|
||||
#find_package(catkin REQUIRED COMPONENTS cpp_common roscpp_serialization roscpp_traits rostime roslz4)
|
||||
find_package(Boost REQUIRED COMPONENTS date_time filesystem program_options regex)
|
||||
|
|
Loading…
Reference in New Issue