Fix build on MacOS-X 10.14: missing cmath header
This undoes a small part of commit 9ec0bcdcf2,
which seems a bit too agressive. Without the cmath header the build fails
using Apple clang version 11.0.0 (clang-1100.0.33.17) on Mojave with the
following error:
.../FreeCAD-git/src/Base/UnitsSchemaInternal.cpp:39:24: error: call to 'abs' is ambiguous
double UnitValue = std::abs(quant.getValue());
^~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/stdlib.h:132:6: note: candidate function
int abs(int) __pure2;
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdlib.h:111:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);}
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdlib.h:113:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);}
^
1 error generated.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include <QString>
|
||||
|
||||
#include "UnitsSchemaInternal.h"
|
||||
#include <cmath>
|
||||
|
||||
|
||||
using namespace Base;
|
||||
|
||||
Reference in New Issue
Block a user