diff --git a/nix/build-all.py b/nix/build-all.py index bfeb0005a7..b11f0d4436 100644 --- a/nix/build-all.py +++ b/nix/build-all.py @@ -428,7 +428,7 @@ def build_dependency(name, mode, build_tool_args, download_url, download_name, d logger.info( "\rInstalled %s \n" % (name,)) else: 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,)) run(["./b2", "-j%s" % (IFCOS_NUM_BUILD_PROCS,)]+build_tool_args, cwd=extract_dir) logger.info("\rInstalling %s... " % (name,)) @@ -662,11 +662,12 @@ if "boost" in targets: "--with-thread", "--with-date_time", "--with-iostreams", - "link={LINK_TYPE}".format(**locals()) + "link={LINK_TYPE}".format(**locals()), ] + \ BOOST_ADDRESS_MODEL + \ list(map(str_concat("cxxflags"), CXXFLAGS.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"], download_url="http://downloads.sourceforge.net/project/boost/boost/{BOOST_VERSION}/".format(**locals()), download_name="boost_{BOOST_VERSION_UNDERSCORE}.tar.bz2".format(**locals()) diff --git a/src/ifcgeom/kernels/cgal/CgalKernel.cpp b/src/ifcgeom/kernels/cgal/CgalKernel.cpp index a99c09dccb..b1b4a78b3e 100644 --- a/src/ifcgeom/kernels/cgal/CgalKernel.cpp +++ b/src/ifcgeom/kernels/cgal/CgalKernel.cpp @@ -258,6 +258,7 @@ namespace { struct point_projection_visitor_ { taxonomy::point3 p; double u; + typedef void result_type; void operator()(const taxonomy::line& c) { project_onto_curve(c, p, u); @@ -279,6 +280,7 @@ namespace { struct point_projection_visitor { taxonomy::item* curve; double u; + typedef void result_type; void operator()(const taxonomy::point3& p) { point_projection_visitor_ v{ p }; diff --git a/src/ifcgeom/schema_agnostic/IfcGeomRepresentation.cpp b/src/ifcgeom/schema_agnostic/IfcGeomRepresentation.cpp index cffc251c29..f216781d57 100644 --- a/src/ifcgeom/schema_agnostic/IfcGeomRepresentation.cpp +++ b/src/ifcgeom/schema_agnostic/IfcGeomRepresentation.cpp @@ -40,10 +40,10 @@ ifcopenshell::geometry::Representation::Serialization::Serialization(const BRep& for (ifcopenshell::geometry::ConversionResults::const_iterator it = brep.begin(); it != brep.end(); ++ it) { if (it->hasStyle() && it->Style().diffuse) { - auto clr = it->Style().diffuse.get().components; - surface_styles_.push_back(clr[0]); - surface_styles_.push_back(clr[1]); - surface_styles_.push_back(clr[2]); + const auto& clr = *it->Style().diffuse.get().components; + surface_styles_.push_back(clr(0)); + surface_styles_.push_back(clr(1)); + surface_styles_.push_back(clr(2)); } else { surface_styles_.push_back(-1.); surface_styles_.push_back(-1.); @@ -96,7 +96,7 @@ ifcopenshell::geometry::ConversionResultShape* ifcopenshell::geometry::Represent // @todo, check gp_GTrsf trsf; gp_Trsf tr; - const auto& m = it->Placement().components; + const auto& m = *it->Placement().components; tr.SetValues( m(0, 0), m(0, 1), m(0, 2), m(0, 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 gp_GTrsf trsf; gp_Trsf tr; - const auto& m = place.components; + const auto& m = *place.components; tr.SetValues( m(0, 0), m(0, 1), m(0, 2), m(0, 3), m(1, 0), m(1, 1), m(1, 2), m(1, 3), diff --git a/src/ifcgeom/taxonomy.cpp b/src/ifcgeom/taxonomy.cpp index cf33e1c96a..4d8043e7a8 100644 --- a/src/ifcgeom/taxonomy.cpp +++ b/src/ifcgeom/taxonomy.cpp @@ -3,6 +3,10 @@ using namespace ifcopenshell::geometry::taxonomy; namespace { + bool compare(const trimmed_curve& a, const trimmed_curve& b); + + bool compare(const collection& a, const collection& b); + template bool compare(const eigen_base& t, const eigen_base& u) { auto t_begin = t.components->data(); @@ -84,10 +88,6 @@ namespace { -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) { // @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. diff --git a/src/ifcparse/Argument.h b/src/ifcparse/Argument.h index ce2da04206..8d5063af61 100644 --- a/src/ifcparse/Argument.h +++ b/src/ifcparse/Argument.h @@ -27,8 +27,7 @@ #include #include "ifc_parse_api.h" - -#include "../ifcparse/IfcEntityList.h" +#include "../ifcparse/ArgumentType.h" #include #include @@ -37,9 +36,11 @@ class Argument; class IfcEntityList; class IfcEntityListList; class IfcEntityInstanceData; + namespace IfcParse { class IfcFile; } + namespace IfcUtil { class IfcBaseClass; @@ -61,11 +62,11 @@ public: virtual operator std::vector() const; virtual operator std::vector() const; virtual operator std::vector >() const; - virtual operator IfcEntityList::ptr() const; + virtual operator boost::shared_ptr() const; virtual operator std::vector< std::vector >() const; virtual operator std::vector< std::vector >() const; - virtual operator IfcEntityListList::ptr() const; + virtual operator boost::shared_ptr() const; virtual bool isNull() const = 0; virtual unsigned int size() const = 0; diff --git a/src/ifcparse/IfcBaseClass.h b/src/ifcparse/IfcBaseClass.h index 81395e972d..2b14043bbc 100644 --- a/src/ifcparse/IfcBaseClass.h +++ b/src/ifcparse/IfcBaseClass.h @@ -23,10 +23,9 @@ #include "ifc_parse_api.h" #include "../ifcparse/IfcEntityInstanceData.h" +#include "../ifcparse/Argument.h" #include "../ifcparse/IfcSchema.h" -class Argument; - namespace IfcUtil { class IFC_PARSE_API IfcBaseClass { diff --git a/src/ifcparse/IfcParse.h b/src/ifcparse/IfcParse.h index 83b10f0796..cd9fa5b90f 100644 --- a/src/ifcparse/IfcParse.h +++ b/src/ifcparse/IfcParse.h @@ -46,11 +46,14 @@ #include "../ifcparse/IfcBaseClass.h" #include "../ifcparse/IfcLogger.h" #include "../ifcparse/Argument.h" +#include "../ifcparse/IfcEntityList.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 */ -#ifdef __GNUC__ # define my_thread_local __thread #elif __STDC_VERSION__ >= 201112L # define my_thread_local _Thread_local