Skip to content

Commit

Permalink
+ apply patch from Debian to fix build failure of KDL with clang
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Apr 1, 2015
1 parent ccfaa56 commit c519989
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 47 deletions.
2 changes: 1 addition & 1 deletion src/Mod/Robot/App/CMakeLists.txt
@@ -1,7 +1,7 @@
if(MSVC)
add_definitions(-DFCAppRobot -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH -DEIGEN2_SUPPORT)
else(MSVC)
add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H -DEIGEN2_SUPPORT)
add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H -DEIGEN2_SUPPORT -DEIGEN_NO_EIGEN2_DEPRECATED_WARNING)
endif(MSVC)


Expand Down
24 changes: 12 additions & 12 deletions src/Mod/Robot/App/kdl_cp/frameacc.hpp
Expand Up @@ -79,9 +79,9 @@ class VectorAcc
IMETHOD friend VectorAcc operator / (const VectorAcc& r2,const doubleAcc& r1);


IMETHOD friend bool Equal(const VectorAcc& r1,const VectorAcc& r2,double eps=epsilon);
IMETHOD friend bool Equal(const Vector& r1,const VectorAcc& r2,double eps=epsilon);
IMETHOD friend bool Equal(const VectorAcc& r1,const Vector& r2,double eps=epsilon);
IMETHOD friend bool Equal(const VectorAcc& r1,const VectorAcc& r2,double eps);
IMETHOD friend bool Equal(const Vector& r1,const VectorAcc& r2,double eps);
IMETHOD friend bool Equal(const VectorAcc& r1,const Vector& r2,double eps);
IMETHOD friend VectorAcc operator - (const VectorAcc& r);
IMETHOD friend doubleAcc dot(const VectorAcc& lhs,const VectorAcc& rhs);
IMETHOD friend doubleAcc dot(const VectorAcc& lhs,const Vector& rhs);
Expand Down Expand Up @@ -133,9 +133,9 @@ class RotationAcc
IMETHOD friend RotationAcc operator* (const RotationAcc& r1,const RotationAcc& r2);
IMETHOD friend RotationAcc operator* (const Rotation& r1,const RotationAcc& r2);
IMETHOD friend RotationAcc operator* (const RotationAcc& r1,const Rotation& r2);
IMETHOD friend bool Equal(const RotationAcc& r1,const RotationAcc& r2,double eps=epsilon);
IMETHOD friend bool Equal(const Rotation& r1,const RotationAcc& r2,double eps=epsilon);
IMETHOD friend bool Equal(const RotationAcc& r1,const Rotation& r2,double eps=epsilon);
IMETHOD friend bool Equal(const RotationAcc& r1,const RotationAcc& r2,double eps);
IMETHOD friend bool Equal(const Rotation& r1,const RotationAcc& r2,double eps);
IMETHOD friend bool Equal(const RotationAcc& r1,const Rotation& r2,double eps);
IMETHOD TwistAcc Inverse(const TwistAcc& arg) const;
IMETHOD TwistAcc Inverse(const Twist& arg) const;
IMETHOD TwistAcc operator * (const TwistAcc& arg) const;
Expand Down Expand Up @@ -171,9 +171,9 @@ class FrameAcc
IMETHOD friend FrameAcc operator * (const FrameAcc& f1,const FrameAcc& f2);
IMETHOD friend FrameAcc operator * (const Frame& f1,const FrameAcc& f2);
IMETHOD friend FrameAcc operator * (const FrameAcc& f1,const Frame& f2);
IMETHOD friend bool Equal(const FrameAcc& r1,const FrameAcc& r2,double eps=epsilon);
IMETHOD friend bool Equal(const Frame& r1,const FrameAcc& r2,double eps=epsilon);
IMETHOD friend bool Equal(const FrameAcc& r1,const Frame& r2,double eps=epsilon);
IMETHOD friend bool Equal(const FrameAcc& r1,const FrameAcc& r2,double eps);
IMETHOD friend bool Equal(const Frame& r1,const FrameAcc& r2,double eps);
IMETHOD friend bool Equal(const FrameAcc& r1,const Frame& r2,double eps);

IMETHOD TwistAcc Inverse(const TwistAcc& arg) const;
IMETHOD TwistAcc Inverse(const Twist& arg) const;
Expand Down Expand Up @@ -227,9 +227,9 @@ class TwistAcc
// the new point.
// Complexity : 6M+6A

IMETHOD friend bool Equal(const TwistAcc& a,const TwistAcc& b,double eps=epsilon);
IMETHOD friend bool Equal(const Twist& a,const TwistAcc& b,double eps=epsilon);
IMETHOD friend bool Equal(const TwistAcc& a,const Twist& b,double eps=epsilon);
IMETHOD friend bool Equal(const TwistAcc& a,const TwistAcc& b,double eps);
IMETHOD friend bool Equal(const Twist& a,const TwistAcc& b,double eps);
IMETHOD friend bool Equal(const TwistAcc& a,const Twist& b,double eps);


IMETHOD Twist GetTwist() const;
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Robot/App/kdl_cp/frames.cpp
Expand Up @@ -377,7 +377,7 @@ double Rotation::GetRotAngle(Vector& axis,double eps) const {

bool operator==(const Rotation& a,const Rotation& b) {
#ifdef KDL_USE_EQUAL
return Equal(a,b);
return Equal(a,b,epsilon);
#else
return ( a.data[0]==b.data[0] &&
a.data[1]==b.data[1] &&
Expand Down
16 changes: 8 additions & 8 deletions src/Mod/Robot/App/kdl_cp/frames.hpp
Expand Up @@ -244,7 +244,7 @@ class Vector

//! do not use operator == because the definition of Equal(.,.) is slightly
//! different. It compares whether the 2 arguments are equal in an eps-interval
inline friend bool Equal(const Vector& a,const Vector& b,double eps=epsilon);
inline friend bool Equal(const Vector& a,const Vector& b,double eps);

//! The literal equality operator==(), also identical.
inline friend bool operator==(const Vector& a,const Vector& b);
Expand Down Expand Up @@ -493,7 +493,7 @@ class Rotation

//! do not use operator == because the definition of Equal(.,.) is slightly
//! different. It compares whether the 2 arguments are equal in an eps-interval
friend bool Equal(const Rotation& a,const Rotation& b,double eps=epsilon);
friend bool Equal(const Rotation& a,const Rotation& b,double eps);

//! The literal equality operator==(), also identical.
friend bool operator==(const Rotation& a,const Rotation& b);
Expand Down Expand Up @@ -651,7 +651,7 @@ class Frame {

//! do not use operator == because the definition of Equal(.,.) is slightly
//! different. It compares whether the 2 arguments are equal in an eps-interval
inline friend bool Equal(const Frame& a,const Frame& b,double eps=epsilon);
inline friend bool Equal(const Frame& a,const Frame& b,double eps);

//! The literal equality operator==(), also identical.
inline friend bool operator==(const Frame& a,const Frame& b);
Expand Down Expand Up @@ -726,7 +726,7 @@ class Twist {

//! do not use operator == because the definition of Equal(.,.) is slightly
//! different. It compares whether the 2 arguments are equal in an eps-interval
inline friend bool Equal(const Twist& a,const Twist& b,double eps=epsilon);
inline friend bool Equal(const Twist& a,const Twist& b,double eps);

//! The literal equality operator==(), also identical.
inline friend bool operator==(const Twist& a,const Twist& b);
Expand Down Expand Up @@ -889,7 +889,7 @@ class Wrench

//! do not use operator == because the definition of Equal(.,.) is slightly
//! different. It compares whether the 2 arguments are equal in an eps-interval
inline friend bool Equal(const Wrench& a,const Wrench& b,double eps=epsilon);
inline friend bool Equal(const Wrench& a,const Wrench& b,double eps);

//! The literal equality operator==(), also identical.
inline friend bool operator==(const Wrench& a,const Wrench& b);
Expand Down Expand Up @@ -982,7 +982,7 @@ class Vector2

//! do not use operator == because the definition of Equal(.,.) is slightly
//! different. It compares whether the 2 arguments are equal in an eps-interval
inline friend bool Equal(const Vector2& a,const Vector2& b,double eps=epsilon);
inline friend bool Equal(const Vector2& a,const Vector2& b,double eps);

//! The literal equality operator==(), also identical.
inline friend bool operator==(const Vector2& a,const Vector2& b);
Expand Down Expand Up @@ -1034,7 +1034,7 @@ class Rotation2

//! do not use operator == because the definition of Equal(.,.) is slightly
//! different. It compares whether the 2 arguments are equal in an eps-interval
inline friend bool Equal(const Rotation2& a,const Rotation2& b,double eps=epsilon);
inline friend bool Equal(const Rotation2& a,const Rotation2& b,double eps);
};

//! A 2D frame class, for further documentation see the Frames class
Expand Down Expand Up @@ -1075,7 +1075,7 @@ class Frame2
tmp.SetIdentity();
return tmp;
}
inline friend bool Equal(const Frame2& a,const Frame2& b,double eps=epsilon);
inline friend bool Equal(const Frame2& a,const Frame2& b,double eps);
};

IMETHOD Vector diff(const Vector& a,const Vector& b,double dt=1);
Expand Down
10 changes: 5 additions & 5 deletions src/Mod/Robot/App/kdl_cp/frames.inl
Expand Up @@ -1294,7 +1294,7 @@ IMETHOD void posrandom(Frame& F) {

IMETHOD bool operator==(const Frame& a,const Frame& b ) {
#ifdef KDL_USE_EQUAL
return Equal(a,b);
return Equal(a,b,epsilon);
#else
return (a.p == b.p &&
a.M == b.M );
Expand All @@ -1307,7 +1307,7 @@ IMETHOD bool operator!=(const Frame& a,const Frame& b) {

IMETHOD bool operator==(const Vector& a,const Vector& b) {
#ifdef KDL_USE_EQUAL
return Equal(a,b);
return Equal(a,b,epsilon);
#else
return (a.data[0]==b.data[0]&&
a.data[1]==b.data[1]&&
Expand All @@ -1321,7 +1321,7 @@ IMETHOD bool operator!=(const Vector& a,const Vector& b) {

IMETHOD bool operator==(const Twist& a,const Twist& b) {
#ifdef KDL_USE_EQUAL
return Equal(a,b);
return Equal(a,b,epsilon);
#else
return (a.rot==b.rot &&
a.vel==b.vel );
Expand All @@ -1334,7 +1334,7 @@ IMETHOD bool operator!=(const Twist& a,const Twist& b) {

IMETHOD bool operator==(const Wrench& a,const Wrench& b ) {
#ifdef KDL_USE_EQUAL
return Equal(a,b);
return Equal(a,b,epsilon);
#else
return (a.force==b.force &&
a.torque==b.torque );
Expand All @@ -1350,7 +1350,7 @@ IMETHOD bool operator!=(const Rotation& a,const Rotation& b) {

IMETHOD bool operator==(const Vector2& a,const Vector2& b) {
#ifdef KDL_USE_EQUAL
return Equal(a,b);
return Equal(a,b,epsilon);
#else
return (a.data[0]==b.data[0]&&
a.data[1]==b.data[1] );
Expand Down
24 changes: 12 additions & 12 deletions src/Mod/Robot/App/kdl_cp/framevel.hpp
Expand Up @@ -111,9 +111,9 @@ class VectorVel
IMETHOD friend void SetToZero(VectorVel& v);


IMETHOD friend bool Equal(const VectorVel& r1,const VectorVel& r2,double eps=epsilon);
IMETHOD friend bool Equal(const Vector& r1,const VectorVel& r2,double eps=epsilon);
IMETHOD friend bool Equal(const VectorVel& r1,const Vector& r2,double eps=epsilon);
IMETHOD friend bool Equal(const VectorVel& r1,const VectorVel& r2,double eps);
IMETHOD friend bool Equal(const Vector& r1,const VectorVel& r2,double eps);
IMETHOD friend bool Equal(const VectorVel& r1,const Vector& r2,double eps);
IMETHOD friend VectorVel operator - (const VectorVel& r);
IMETHOD friend doubleVel dot(const VectorVel& lhs,const VectorVel& rhs);
IMETHOD friend doubleVel dot(const VectorVel& lhs,const Vector& rhs);
Expand Down Expand Up @@ -167,9 +167,9 @@ class RotationVel
IMETHOD friend RotationVel operator* (const RotationVel& r1,const RotationVel& r2);
IMETHOD friend RotationVel operator* (const Rotation& r1,const RotationVel& r2);
IMETHOD friend RotationVel operator* (const RotationVel& r1,const Rotation& r2);
IMETHOD friend bool Equal(const RotationVel& r1,const RotationVel& r2,double eps=epsilon);
IMETHOD friend bool Equal(const Rotation& r1,const RotationVel& r2,double eps=epsilon);
IMETHOD friend bool Equal(const RotationVel& r1,const Rotation& r2,double eps=epsilon);
IMETHOD friend bool Equal(const RotationVel& r1,const RotationVel& r2,double eps);
IMETHOD friend bool Equal(const Rotation& r1,const RotationVel& r2,double eps);
IMETHOD friend bool Equal(const RotationVel& r1,const Rotation& r2,double eps);

IMETHOD TwistVel Inverse(const TwistVel& arg) const;
IMETHOD TwistVel Inverse(const Twist& arg) const;
Expand Down Expand Up @@ -221,9 +221,9 @@ class FrameVel
IMETHOD friend FrameVel operator * (const FrameVel& f1,const FrameVel& f2);
IMETHOD friend FrameVel operator * (const Frame& f1,const FrameVel& f2);
IMETHOD friend FrameVel operator * (const FrameVel& f1,const Frame& f2);
IMETHOD friend bool Equal(const FrameVel& r1,const FrameVel& r2,double eps=epsilon);
IMETHOD friend bool Equal(const Frame& r1,const FrameVel& r2,double eps=epsilon);
IMETHOD friend bool Equal(const FrameVel& r1,const Frame& r2,double eps=epsilon);
IMETHOD friend bool Equal(const FrameVel& r1,const FrameVel& r2,double eps);
IMETHOD friend bool Equal(const Frame& r1,const FrameVel& r2,double eps);
IMETHOD friend bool Equal(const FrameVel& r1,const Frame& r2,double eps);

IMETHOD TwistVel Inverse(const TwistVel& arg) const;
IMETHOD TwistVel Inverse(const Twist& arg) const;
Expand Down Expand Up @@ -293,9 +293,9 @@ class TwistVel
// = Equality operators
// do not use operator == because the definition of Equal(.,.) is slightly
// different. It compares whether the 2 arguments are equal in an eps-interval
IMETHOD friend bool Equal(const TwistVel& a,const TwistVel& b,double eps=epsilon);
IMETHOD friend bool Equal(const Twist& a,const TwistVel& b,double eps=epsilon);
IMETHOD friend bool Equal(const TwistVel& a,const Twist& b,double eps=epsilon);
IMETHOD friend bool Equal(const TwistVel& a,const TwistVel& b,double eps);
IMETHOD friend bool Equal(const Twist& a,const TwistVel& b,double eps);
IMETHOD friend bool Equal(const TwistVel& a,const Twist& b,double eps);

// = Conversion to other entities
IMETHOD Twist GetTwist() const;
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/Robot/App/kdl_cp/jacobian.cpp
Expand Up @@ -126,12 +126,12 @@ namespace KDL

bool Jacobian::operator ==(const Jacobian& arg)const
{
return Equal((*this),arg);
return Equal((*this),arg,epsilon);
}

bool Jacobian::operator!=(const Jacobian& arg)const
{
return !Equal((*this),arg);
return !Equal((*this),arg,epsilon);
}

bool Equal(const Jacobian& a,const Jacobian& b,double eps)
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Robot/App/kdl_cp/jacobian.hpp
Expand Up @@ -44,7 +44,7 @@ namespace KDL
bool operator ==(const Jacobian& arg)const;
bool operator !=(const Jacobian& arg)const;

friend bool Equal(const Jacobian& a,const Jacobian& b,double eps=epsilon);
friend bool Equal(const Jacobian& a,const Jacobian& b,double eps);


~Jacobian();
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Robot/App/kdl_cp/jntarrayacc.hpp
Expand Up @@ -61,7 +61,7 @@ namespace KDL
friend void Divide(const JntArrayAcc& src,const doubleVel& factor,JntArrayAcc& dest);
friend void Divide(const JntArrayAcc& src,const doubleAcc& factor,JntArrayAcc& dest);
friend void SetToZero(JntArrayAcc& array);
friend bool Equal(const JntArrayAcc& src1,const JntArrayAcc& src2,double eps=epsilon);
friend bool Equal(const JntArrayAcc& src1,const JntArrayAcc& src2,double eps);

};
}
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Robot/App/kdl_cp/jntarrayvel.hpp
Expand Up @@ -54,7 +54,7 @@ namespace KDL
friend void Divide(const JntArrayVel& src,const double& factor,JntArrayVel& dest);
friend void Divide(const JntArrayVel& src,const doubleVel& factor,JntArrayVel& dest);
friend void SetToZero(JntArrayVel& array);
friend bool Equal(const JntArrayVel& src1,const JntArrayVel& src2,double eps=epsilon);
friend bool Equal(const JntArrayVel& src1,const JntArrayVel& src2,double eps);

};
}
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Robot/App/kdl_cp/jntspaceinertiamatrix.cpp
Expand Up @@ -115,7 +115,7 @@ namespace KDL
return src1.data.isApprox(src2.data,eps);
}

bool operator==(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2){return Equal(src1,src2);};
bool operator==(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2){return Equal(src1,src2,epsilon);};
//bool operator!=(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2){return Equal(src1,src2);};

}
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Robot/App/kdl_cp/jntspaceinertiamatrix.hpp
Expand Up @@ -203,7 +203,7 @@ class MyTask : public RTT::TaskContext
* @return true if each element of src1 is within eps of the same
* element in src2, or if both src1 and src2 have no data (ie 0==rows())
*/
friend bool Equal(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2,double eps=epsilon);
friend bool Equal(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2,double eps);

friend bool operator==(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2);
//friend bool operator!=(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2);
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Robot/Gui/CMakeLists.txt
@@ -1,7 +1,7 @@
if(MSVC)
add_definitions(-DFCGuiRobot -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH -DEIGEN2_SUPPORT)
else(MSVC)
add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H -DEIGEN2_SUPPORT)
add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H -DEIGEN2_SUPPORT -DEIGEN_NO_EIGEN2_DEPRECATED_WARNING)
endif(MSVC)


Expand Down

0 comments on commit c519989

Please sign in to comment.