Handle clang 10 warnings:
+ fix -Wtautological-bitwise-compare + fix -Wimplicit-int-float-conversion + fix -Wmisleading-indentation + fix -Wrange-loop-construct + suppress -Wdeprecated-copy of 3rd party libs
This commit is contained in:
@@ -29,6 +29,12 @@
|
||||
# include <iterator>
|
||||
#endif
|
||||
|
||||
#if defined(__clang__) && defined(__has_warning)
|
||||
#if __has_warning("-Wdeprecated-copy")
|
||||
# pragma clang diagnostic ignored "-Wdeprecated-copy"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "Approximation.h"
|
||||
#include "Elements.h"
|
||||
#include "Utilities.h"
|
||||
|
||||
@@ -61,6 +61,12 @@
|
||||
# include <iterator>
|
||||
#endif
|
||||
|
||||
#if defined(__clang__) && defined(__has_warning)
|
||||
#if __has_warning("-Wdeprecated-copy")
|
||||
# pragma clang diagnostic ignored "-Wdeprecated-copy"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "CylinderFit.h"
|
||||
#include <Base/Console.h>
|
||||
#include <Mod/Mesh/App/WildMagic4/Wm4ApprLineFit3.h>
|
||||
|
||||
@@ -28,6 +28,12 @@
|
||||
#ifndef _PreComp_
|
||||
#endif
|
||||
|
||||
#if defined(__clang__) && defined(__has_warning)
|
||||
#if __has_warning("-Wdeprecated-copy")
|
||||
# pragma clang diagnostic ignored "-Wdeprecated-copy"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "KDTree.h"
|
||||
#include <kdtree++/kdtree.hpp>
|
||||
|
||||
|
||||
@@ -28,6 +28,12 @@
|
||||
# include <iterator>
|
||||
#endif
|
||||
|
||||
#if defined(__clang__) && defined(__has_warning)
|
||||
#if __has_warning("-Wdeprecated-copy")
|
||||
# pragma clang diagnostic ignored "-Wdeprecated-copy"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "SphereFit.h"
|
||||
#include <Base/Console.h>
|
||||
|
||||
|
||||
@@ -22,6 +22,13 @@
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#if defined(__clang__) && defined(__has_warning)
|
||||
#if __has_warning("-Wdeprecated-copy")
|
||||
# pragma clang diagnostic ignored "-Wdeprecated-copy"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <sstream>
|
||||
# include <BRepBuilderAPI_MakeEdge.hxx>
|
||||
|
||||
@@ -22,6 +22,13 @@
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#if defined(__clang__) && defined(__has_warning)
|
||||
#if __has_warning("-Wdeprecated-copy")
|
||||
# pragma clang diagnostic ignored "-Wdeprecated-copy"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <BRepBuilderAPI_MakeFace.hxx>
|
||||
# include <gp_Circ.hxx>
|
||||
|
||||
@@ -151,7 +151,7 @@ static void findGeometry(int minFaces, double tolerance,
|
||||
|
||||
for (auto segmIt : segm) {
|
||||
const std::vector<MeshCore::MeshSegment>& data = segmIt->GetSegments();
|
||||
for (const auto dataIt : data) {
|
||||
for (const auto& dataIt : data) {
|
||||
vpm->addSelection(dataIt);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,6 +125,12 @@ SOURCE_GROUP("Module" FILES ${Mod_SRCS})
|
||||
add_library(Robot SHARED ${Robot_SRCS})
|
||||
target_link_libraries(Robot ${Robot_LIBS})
|
||||
|
||||
unset(_flag_found CACHE)
|
||||
check_cxx_compiler_flag("-Wno-deprecated-copy" _flag_found)
|
||||
if (_flag_found)
|
||||
target_compile_options(Robot PRIVATE -Wno-deprecated-copy)
|
||||
endif()
|
||||
|
||||
SET_BIN_DIR(Robot Robot /Mod/Robot)
|
||||
SET_PYTHON_PREFIX_SUFFIX(Robot)
|
||||
|
||||
|
||||
@@ -156,6 +156,12 @@ SET(RobotGuiIcon_SVG
|
||||
add_library(RobotGui SHARED ${RobotGui_SRCS} ${RobotGuiIcon_SVG})
|
||||
target_link_libraries(RobotGui ${RobotGui_LIBS})
|
||||
|
||||
unset(_flag_found CACHE)
|
||||
check_cxx_compiler_flag("-Wno-deprecated-copy" _flag_found)
|
||||
if (_flag_found)
|
||||
target_compile_options(RobotGui PRIVATE -Wno-deprecated-copy)
|
||||
endif ()
|
||||
|
||||
|
||||
SET_BIN_DIR(RobotGui RobotGui /Mod/Robot)
|
||||
SET_PYTHON_PREFIX_SUFFIX(RobotGui)
|
||||
|
||||
@@ -25,6 +25,12 @@
|
||||
#pragma warning(disable : 4996)
|
||||
#endif
|
||||
|
||||
#if defined(__clang__) && defined(__has_warning)
|
||||
#if __has_warning("-Wdeprecated-copy")
|
||||
# pragma clang diagnostic ignored "-Wdeprecated-copy"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//#define _GCS_DEBUG
|
||||
//#define _GCS_DEBUG_SOLVER_JACOBIAN_QR_DECOMPOSITION_TRIANGULAR_MATRIX
|
||||
//#define _DEBUG_TO_FILE // Many matrices surpass the report view string size.
|
||||
|
||||
@@ -24,6 +24,12 @@
|
||||
#pragma warning(disable : 4244)
|
||||
#endif
|
||||
|
||||
#if defined(__clang__) && defined(__has_warning)
|
||||
#if __has_warning("-Wdeprecated-copy")
|
||||
# pragma clang diagnostic ignored "-Wdeprecated-copy"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
#include <Eigen/QR>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user