From 501447fa5fb186dc179bf0e3873dcac7e679b173 Mon Sep 17 00:00:00 2001 From: Harald Geyer Date: Fri, 19 Jun 2020 22:03:41 +0200 Subject: [PATCH] Fix building with -DIFCXML_SUPPORT=OFF --- src/ifcwrap/IfcParseWrapper.i | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ifcwrap/IfcParseWrapper.i b/src/ifcwrap/IfcParseWrapper.i index 837e5ffb6a..8945d4e8b7 100644 --- a/src/ifcwrap/IfcParseWrapper.i +++ b/src/ifcwrap/IfcParseWrapper.i @@ -522,7 +522,10 @@ static IfcUtil::ArgumentType helper_fn_attribute_type(const IfcUtil::IfcBaseClas // The IfcFile* returned by open() is to be freed by SWIG/Python %newobject open; %newobject read; + +#ifdef WITH_IFCXML %newobject parse_ifcxml; +#endif %inline %{ IfcParse::IfcFile* open(const std::string& fn) { @@ -530,9 +533,11 @@ static IfcUtil::ArgumentType helper_fn_attribute_type(const IfcUtil::IfcBaseClas return f; } +#ifdef WITH_IFCXML IfcParse::IfcFile* parse_ifcxml(const std::string& fn) { return IfcParse::parse_ifcxml(fn); } +#endif IfcParse::IfcFile* read(const std::string& data) { char* copiedData = new char[data.length()];