mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 14:41:25 +00:00
fixes for clang
This commit is contained in:
+3
-2
@@ -428,7 +428,7 @@ def build_dependency(name, mode, build_tool_args, download_url, download_name, d
|
|||||||
logger.info( "\rInstalled %s \n" % (name,))
|
logger.info( "\rInstalled %s \n" % (name,))
|
||||||
else:
|
else:
|
||||||
logger.info( "\rConfiguring %s..." % (name,))
|
logger.info( "\rConfiguring %s..." % (name,))
|
||||||
run([bash, "./bootstrap.sh"], cwd=extract_dir)
|
run([bash, "./bootstrap.sh"] + (['--with-toolset=clang'] if "clang" in os.environ.get('CXX', '') else []), cwd=extract_dir)
|
||||||
logger.info("\rBuilding %s... " % (name,))
|
logger.info("\rBuilding %s... " % (name,))
|
||||||
run(["./b2", "-j%s" % (IFCOS_NUM_BUILD_PROCS,)]+build_tool_args, cwd=extract_dir)
|
run(["./b2", "-j%s" % (IFCOS_NUM_BUILD_PROCS,)]+build_tool_args, cwd=extract_dir)
|
||||||
logger.info("\rInstalling %s... " % (name,))
|
logger.info("\rInstalling %s... " % (name,))
|
||||||
@@ -662,11 +662,12 @@ if "boost" in targets:
|
|||||||
"--with-thread",
|
"--with-thread",
|
||||||
"--with-date_time",
|
"--with-date_time",
|
||||||
"--with-iostreams",
|
"--with-iostreams",
|
||||||
"link={LINK_TYPE}".format(**locals())
|
"link={LINK_TYPE}".format(**locals()),
|
||||||
] + \
|
] + \
|
||||||
BOOST_ADDRESS_MODEL + \
|
BOOST_ADDRESS_MODEL + \
|
||||||
list(map(str_concat("cxxflags"), CXXFLAGS.strip().split(' '))) + \
|
list(map(str_concat("cxxflags"), CXXFLAGS.strip().split(' '))) + \
|
||||||
list(map(str_concat("linkflags"), LDFLAGS.strip().split(' '))) + \
|
list(map(str_concat("linkflags"), LDFLAGS.strip().split(' '))) + \
|
||||||
|
(["toolset=clang"] if "clang" in os.environ.get('CXX', '') else []) +\
|
||||||
["stage", "-s", "NO_BZIP2=1"],
|
["stage", "-s", "NO_BZIP2=1"],
|
||||||
download_url="http://downloads.sourceforge.net/project/boost/boost/{BOOST_VERSION}/".format(**locals()),
|
download_url="http://downloads.sourceforge.net/project/boost/boost/{BOOST_VERSION}/".format(**locals()),
|
||||||
download_name="boost_{BOOST_VERSION_UNDERSCORE}.tar.bz2".format(**locals())
|
download_name="boost_{BOOST_VERSION_UNDERSCORE}.tar.bz2".format(**locals())
|
||||||
|
|||||||
@@ -258,6 +258,7 @@ namespace {
|
|||||||
struct point_projection_visitor_ {
|
struct point_projection_visitor_ {
|
||||||
taxonomy::point3 p;
|
taxonomy::point3 p;
|
||||||
double u;
|
double u;
|
||||||
|
typedef void result_type;
|
||||||
|
|
||||||
void operator()(const taxonomy::line& c) {
|
void operator()(const taxonomy::line& c) {
|
||||||
project_onto_curve(c, p, u);
|
project_onto_curve(c, p, u);
|
||||||
@@ -279,6 +280,7 @@ namespace {
|
|||||||
struct point_projection_visitor {
|
struct point_projection_visitor {
|
||||||
taxonomy::item* curve;
|
taxonomy::item* curve;
|
||||||
double u;
|
double u;
|
||||||
|
typedef void result_type;
|
||||||
|
|
||||||
void operator()(const taxonomy::point3& p) {
|
void operator()(const taxonomy::point3& p) {
|
||||||
point_projection_visitor_ v{ p };
|
point_projection_visitor_ v{ p };
|
||||||
|
|||||||
@@ -40,10 +40,10 @@ ifcopenshell::geometry::Representation::Serialization::Serialization(const BRep&
|
|||||||
|
|
||||||
for (ifcopenshell::geometry::ConversionResults::const_iterator it = brep.begin(); it != brep.end(); ++ it) {
|
for (ifcopenshell::geometry::ConversionResults::const_iterator it = brep.begin(); it != brep.end(); ++ it) {
|
||||||
if (it->hasStyle() && it->Style().diffuse) {
|
if (it->hasStyle() && it->Style().diffuse) {
|
||||||
auto clr = it->Style().diffuse.get().components;
|
const auto& clr = *it->Style().diffuse.get().components;
|
||||||
surface_styles_.push_back(clr[0]);
|
surface_styles_.push_back(clr(0));
|
||||||
surface_styles_.push_back(clr[1]);
|
surface_styles_.push_back(clr(1));
|
||||||
surface_styles_.push_back(clr[2]);
|
surface_styles_.push_back(clr(2));
|
||||||
} else {
|
} else {
|
||||||
surface_styles_.push_back(-1.);
|
surface_styles_.push_back(-1.);
|
||||||
surface_styles_.push_back(-1.);
|
surface_styles_.push_back(-1.);
|
||||||
@@ -96,7 +96,7 @@ ifcopenshell::geometry::ConversionResultShape* ifcopenshell::geometry::Represent
|
|||||||
// @todo, check
|
// @todo, check
|
||||||
gp_GTrsf trsf;
|
gp_GTrsf trsf;
|
||||||
gp_Trsf tr;
|
gp_Trsf tr;
|
||||||
const auto& m = it->Placement().components;
|
const auto& m = *it->Placement().components;
|
||||||
tr.SetValues(
|
tr.SetValues(
|
||||||
m(0, 0), m(0, 1), m(0, 2), m(0, 3),
|
m(0, 0), m(0, 1), m(0, 2), m(0, 3),
|
||||||
m(1, 0), m(1, 1), m(1, 2), m(1, 3),
|
m(1, 0), m(1, 1), m(1, 2), m(1, 3),
|
||||||
@@ -244,7 +244,7 @@ bool ifcopenshell::geometry::Representation::BRep::calculate_projected_surface_a
|
|||||||
// @todo check
|
// @todo check
|
||||||
gp_GTrsf trsf;
|
gp_GTrsf trsf;
|
||||||
gp_Trsf tr;
|
gp_Trsf tr;
|
||||||
const auto& m = place.components;
|
const auto& m = *place.components;
|
||||||
tr.SetValues(
|
tr.SetValues(
|
||||||
m(0, 0), m(0, 1), m(0, 2), m(0, 3),
|
m(0, 0), m(0, 1), m(0, 2), m(0, 3),
|
||||||
m(1, 0), m(1, 1), m(1, 2), m(1, 3),
|
m(1, 0), m(1, 1), m(1, 2), m(1, 3),
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
using namespace ifcopenshell::geometry::taxonomy;
|
using namespace ifcopenshell::geometry::taxonomy;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
bool compare(const trimmed_curve& a, const trimmed_curve& b);
|
||||||
|
|
||||||
|
bool compare(const collection& a, const collection& b);
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
bool compare(const eigen_base<T>& t, const eigen_base<T>& u) {
|
bool compare(const eigen_base<T>& t, const eigen_base<T>& u) {
|
||||||
auto t_begin = t.components->data();
|
auto t_begin = t.components->data();
|
||||||
@@ -84,10 +88,6 @@ namespace {
|
|||||||
-1 : (!b_lt_a ? 0 : 1);
|
-1 : (!b_lt_a ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool compare(const trimmed_curve& a, const trimmed_curve& b);
|
|
||||||
|
|
||||||
bool compare(const collection& a, const collection& b);
|
|
||||||
|
|
||||||
bool compare(const extrusion& a, const extrusion& b) {
|
bool compare(const extrusion& a, const extrusion& b) {
|
||||||
// @todo extrusions can also have non-identity matrices right? perhaps it's time
|
// @todo extrusions can also have non-identity matrices right? perhaps it's time
|
||||||
// for a dedicated transform node and not on the abstract geom_item.
|
// for a dedicated transform node and not on the abstract geom_item.
|
||||||
|
|||||||
@@ -27,8 +27,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "ifc_parse_api.h"
|
#include "ifc_parse_api.h"
|
||||||
|
#include "../ifcparse/ArgumentType.h"
|
||||||
#include "../ifcparse/IfcEntityList.h"
|
|
||||||
|
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <boost/dynamic_bitset.hpp>
|
#include <boost/dynamic_bitset.hpp>
|
||||||
@@ -37,9 +36,11 @@ class Argument;
|
|||||||
class IfcEntityList;
|
class IfcEntityList;
|
||||||
class IfcEntityListList;
|
class IfcEntityListList;
|
||||||
class IfcEntityInstanceData;
|
class IfcEntityInstanceData;
|
||||||
|
|
||||||
namespace IfcParse {
|
namespace IfcParse {
|
||||||
class IfcFile;
|
class IfcFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace IfcUtil {
|
namespace IfcUtil {
|
||||||
class IfcBaseClass;
|
class IfcBaseClass;
|
||||||
|
|
||||||
@@ -61,11 +62,11 @@ public:
|
|||||||
virtual operator std::vector<double>() const;
|
virtual operator std::vector<double>() const;
|
||||||
virtual operator std::vector<std::string>() const;
|
virtual operator std::vector<std::string>() const;
|
||||||
virtual operator std::vector<boost::dynamic_bitset<> >() const;
|
virtual operator std::vector<boost::dynamic_bitset<> >() const;
|
||||||
virtual operator IfcEntityList::ptr() const;
|
virtual operator boost::shared_ptr<IfcEntityList>() const;
|
||||||
|
|
||||||
virtual operator std::vector< std::vector<int> >() const;
|
virtual operator std::vector< std::vector<int> >() const;
|
||||||
virtual operator std::vector< std::vector<double> >() const;
|
virtual operator std::vector< std::vector<double> >() const;
|
||||||
virtual operator IfcEntityListList::ptr() const;
|
virtual operator boost::shared_ptr<IfcEntityListList>() const;
|
||||||
|
|
||||||
virtual bool isNull() const = 0;
|
virtual bool isNull() const = 0;
|
||||||
virtual unsigned int size() const = 0;
|
virtual unsigned int size() const = 0;
|
||||||
|
|||||||
@@ -23,10 +23,9 @@
|
|||||||
#include "ifc_parse_api.h"
|
#include "ifc_parse_api.h"
|
||||||
|
|
||||||
#include "../ifcparse/IfcEntityInstanceData.h"
|
#include "../ifcparse/IfcEntityInstanceData.h"
|
||||||
|
#include "../ifcparse/Argument.h"
|
||||||
#include "../ifcparse/IfcSchema.h"
|
#include "../ifcparse/IfcSchema.h"
|
||||||
|
|
||||||
class Argument;
|
|
||||||
|
|
||||||
namespace IfcUtil {
|
namespace IfcUtil {
|
||||||
|
|
||||||
class IFC_PARSE_API IfcBaseClass {
|
class IFC_PARSE_API IfcBaseClass {
|
||||||
|
|||||||
@@ -46,11 +46,14 @@
|
|||||||
#include "../ifcparse/IfcBaseClass.h"
|
#include "../ifcparse/IfcBaseClass.h"
|
||||||
#include "../ifcparse/IfcLogger.h"
|
#include "../ifcparse/IfcLogger.h"
|
||||||
#include "../ifcparse/Argument.h"
|
#include "../ifcparse/Argument.h"
|
||||||
|
#include "../ifcparse/IfcEntityList.h"
|
||||||
|
|
||||||
#include "../ifcparse/IfcSpfStream.h"
|
#include "../ifcparse/IfcSpfStream.h"
|
||||||
|
|
||||||
|
#if defined(__llvm__)
|
||||||
|
# define my_thread_local thread_local
|
||||||
|
#elif defined(__GNUC__)
|
||||||
/* gcc doesn't know _Thread_local from C11 yet */
|
/* gcc doesn't know _Thread_local from C11 yet */
|
||||||
#ifdef __GNUC__
|
|
||||||
# define my_thread_local __thread
|
# define my_thread_local __thread
|
||||||
#elif __STDC_VERSION__ >= 201112L
|
#elif __STDC_VERSION__ >= 201112L
|
||||||
# define my_thread_local _Thread_local
|
# define my_thread_local _Thread_local
|
||||||
|
|||||||
Reference in New Issue
Block a user