+ fix build problems with MSVC and libpack
This commit is contained in:
parent
4a3de89af0
commit
b936514937
4
src/3rdParty/salomesmesh/CMakeLists.txt
vendored
4
src/3rdParty/salomesmesh/CMakeLists.txt
vendored
|
@ -6,7 +6,9 @@ SET(SMESH_VERSION_MINOR 1)
|
|||
SET(SMESH_VERSION_PATCH 2)
|
||||
SET(SMESH_VERSION_TWEAK 2)
|
||||
|
||||
set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -Wno-sign-compare -Wno-reorder -Wno-switch -Wno-unused-variable -Wno-unused-but-set-variable -Wno-comment")
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
|
||||
set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -Wno-sign-compare -Wno-reorder -Wno-switch -Wno-unused-variable -Wno-unused-but-set-variable -Wno-comment")
|
||||
endif()
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#include <App/PropertyUnits.h>
|
||||
#include <App/ObjectIdentifier.h>
|
||||
#include <boost/math/special_functions/round.hpp>
|
||||
#include <boost/math/special_functions/trunc.hpp>
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
|
@ -770,10 +771,10 @@ Expression * FunctionExpression::eval() const
|
|||
break;
|
||||
}
|
||||
case ROUND:
|
||||
output = round(value);
|
||||
output = boost::math::round(value);
|
||||
break;
|
||||
case TRUNC:
|
||||
output = trunc(value);
|
||||
output = boost::math::trunc(value);
|
||||
break;
|
||||
case CEIL:
|
||||
output = ceil(value);
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#endif
|
||||
|
||||
/// Here the FreeCAD includes sorted by Base,App,Gui......
|
||||
#include <boost/math/special_functions/round.hpp>
|
||||
|
||||
#include <Base/Exception.h>
|
||||
#include <Base/Reader.h>
|
||||
|
@ -139,9 +140,9 @@ void PropertyInteger::setValue(const ObjectIdentifier &path, const boost::any &v
|
|||
if (value.type() == typeid(long))
|
||||
setValue(boost::any_cast<long>(value));
|
||||
else if (value.type() == typeid(double))
|
||||
setValue(round(boost::any_cast<double>(value)));
|
||||
setValue(boost::math::round(boost::any_cast<double>(value)));
|
||||
else if (value.type() == typeid(Quantity) && boost::any_cast<Quantity>(value).getUnit().isEmpty())
|
||||
setValue(round(boost::any_cast<Quantity>(value).getValue()));
|
||||
setValue(boost::math::round(boost::any_cast<Quantity>(value).getValue()));
|
||||
else if (value.type() == typeid(int))
|
||||
setValue(boost::any_cast<int>(value));
|
||||
else
|
||||
|
@ -1914,7 +1915,7 @@ void PropertyBool::setValue(const ObjectIdentifier &path, const boost::any &valu
|
|||
else if (value.type() == typeid(int))
|
||||
setValue(boost::any_cast<int>(value) != 0);
|
||||
else if (value.type() == typeid(double))
|
||||
setValue(round(boost::any_cast<double>(value)));
|
||||
setValue(boost::math::round(boost::any_cast<double>(value)));
|
||||
else if (value.type() == typeid(Quantity) && boost::any_cast<Quantity>(value).getUnit().isEmpty())
|
||||
setValue(boost::any_cast<Quantity>(value).getValue() != 0);
|
||||
else
|
||||
|
|
|
@ -14,6 +14,7 @@ include_directories(
|
|||
${OCC_INCLUDE_DIR}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
${XercesC_INCLUDE_DIRS}
|
||||
${QT_QTCORE_INCLUDE_DIR}
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
)
|
||||
link_directories(${OCC_LIBRARY_DIR})
|
||||
|
|
|
@ -11,6 +11,7 @@ include_directories(
|
|||
${ZLIB_INCLUDE_DIR}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
${XercesC_INCLUDE_DIRS}
|
||||
${QT_QTCORE_INCLUDE_DIR}
|
||||
)
|
||||
link_directories(${OCC_LIBRARY_DIR})
|
||||
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
# include <QTimer>
|
||||
#endif
|
||||
|
||||
#include <boost/math/special_functions/round.hpp>
|
||||
|
||||
#include "ui_TaskLinearPatternParameters.h"
|
||||
#include "TaskLinearPatternParameters.h"
|
||||
#include "TaskMultiTransformParameters.h"
|
||||
|
@ -278,7 +280,7 @@ void TaskLinearPatternParameters::onOccurrences(const double n) {
|
|||
if (blockUpdate)
|
||||
return;
|
||||
PartDesign::LinearPattern* pcLinearPattern = static_cast<PartDesign::LinearPattern*>(getObject());
|
||||
pcLinearPattern->Occurrences.setValue(round(n));
|
||||
pcLinearPattern->Occurrences.setValue(boost::math::round(n));
|
||||
|
||||
exitSelectionMode();
|
||||
kickUpdateViewTimer();
|
||||
|
@ -380,7 +382,7 @@ const double TaskLinearPatternParameters::getLength(void) const
|
|||
|
||||
const unsigned TaskLinearPatternParameters::getOccurrences(void) const
|
||||
{
|
||||
return round(ui->spinOccurrences->value().getValue());
|
||||
return boost::math::round(ui->spinOccurrences->value().getValue());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
# include <QTimer>
|
||||
#endif
|
||||
|
||||
#include <boost/math/special_functions/round.hpp>
|
||||
|
||||
#include "ui_TaskPolarPatternParameters.h"
|
||||
#include "TaskPolarPatternParameters.h"
|
||||
#include "TaskMultiTransformParameters.h"
|
||||
|
@ -251,7 +253,7 @@ void TaskPolarPatternParameters::onOccurrences(const double n) {
|
|||
if (blockUpdate)
|
||||
return;
|
||||
PartDesign::PolarPattern* pcPolarPattern = static_cast<PartDesign::PolarPattern*>(getObject());
|
||||
pcPolarPattern->Occurrences.setValue(round(n));
|
||||
pcPolarPattern->Occurrences.setValue(boost::math::round(n));
|
||||
|
||||
exitSelectionMode();
|
||||
kickUpdateViewTimer();
|
||||
|
@ -326,7 +328,7 @@ const double TaskPolarPatternParameters::getAngle(void) const
|
|||
|
||||
const unsigned TaskPolarPatternParameters::getOccurrences(void) const
|
||||
{
|
||||
return round(ui->spinOccurrences->value().getValue());
|
||||
return boost::math::round(ui->spinOccurrences->value().getValue());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
# include <QMessageBox>
|
||||
#endif
|
||||
|
||||
#include <boost/math/special_functions/round.hpp>
|
||||
|
||||
#include "ui_TaskScaledParameters.h"
|
||||
#include "TaskScaledParameters.h"
|
||||
#include "TaskMultiTransformParameters.h"
|
||||
|
@ -160,7 +162,7 @@ void TaskScaledParameters::onOccurrences(const double n)
|
|||
if (blockUpdate)
|
||||
return;
|
||||
PartDesign::Scaled* pcScaled = static_cast<PartDesign::Scaled*>(getObject());
|
||||
pcScaled->Occurrences.setValue(round(n));
|
||||
pcScaled->Occurrences.setValue(boost::math::round(n));
|
||||
recomputeFeature();
|
||||
}
|
||||
|
||||
|
@ -183,7 +185,7 @@ const double TaskScaledParameters::getFactor(void) const
|
|||
|
||||
const unsigned TaskScaledParameters::getOccurrences(void) const
|
||||
{
|
||||
return round(ui->spinOccurrences->value().getValue());
|
||||
return boost::math::round(ui->spinOccurrences->value().getValue());
|
||||
}
|
||||
|
||||
TaskScaledParameters::~TaskScaledParameters()
|
||||
|
|
|
@ -15,6 +15,7 @@ include_directories(
|
|||
${EIGEN3_INCLUDE_DIR}
|
||||
${PCL_INCLUDE_DIRS}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
${QT_QTCORE_INCLUDE_DIR}
|
||||
${XercesC_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
)
|
||||
|
|
|
@ -11,6 +11,7 @@ include_directories(
|
|||
${Boost_INCLUDE_DIRS}
|
||||
${OCC_INCLUDE_DIR}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
${QT_QTCORE_INCLUDE_DIR}
|
||||
${XercesC_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user