Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace XML parser for libE57Format #3510

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
url = https://github.com/oneapi-src/oneTBB.git
[submodule "thirdparty/libE57Format"]
path = thirdparty/libE57Format
url = https://github.com/asmaloney/libE57Format
url = https://github.com/MeshInspector/libE57Format
[submodule "thirdparty/laz-perf"]
path = thirdparty/laz-perf
url = https://github.com/hobuinc/laz-perf.git
Expand Down
1 change: 0 additions & 1 deletion requirements/fedora.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@ tbb-devel
time
tinyxml2-devel
turbojpeg-devel
xerces-c-devel
1 change: 0 additions & 1 deletion requirements/macos.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ python@3.10
spdlog
tbb
tinyxml2
xerces-c
zlib
1 change: 0 additions & 1 deletion requirements/ubuntu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ libtbb-dev
libtiff-dev
libtinyxml2-dev
libturbojpeg0-dev
libxerces-c-dev
libzip-dev
libzstd-dev
occt-misc
Expand Down
2 changes: 2 additions & 0 deletions scripts/build_thirdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ if [ "${MR_EMSCRIPTEN}" == "ON" ]; then
cmake --build . -j ${NPROC}
cmake --install .

# build libE57Format separately
CMAKE_OPTIONS="${MR_CMAKE_OPTIONS}" ${SCRIPT_DIR}/thirdparty/libE57Format.sh ${MESHLIB_THIRDPARTY_DIR}/libE57Format
# build OpenVDB separately
CMAKE_OPTIONS="${MR_CMAKE_OPTIONS}" ${SCRIPT_DIR}/thirdparty/openvdb.sh ${MESHLIB_THIRDPARTY_DIR}/openvdb/v10/openvdb
else
Expand Down
13 changes: 13 additions & 0 deletions scripts/thirdparty/libE57Format.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
set -eo pipefail

SOURCE_DIR="$1"
BUILD_DIR="${2:-./libE57Format_build}"

CMAKE_OPTIONS="${CMAKE_OPTIONS} \
-D E57_XML_PARSER=TinyXML2 \
"

cmake -S "${SOURCE_DIR}" -B "${BUILD_DIR}" ${CMAKE_OPTIONS}
cmake --build "${BUILD_DIR}" -j `nproc`
cmake --install "${BUILD_DIR}"
1 change: 0 additions & 1 deletion source/MRIOExtras/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ option(MRIOEXTRAS_NO_ZLIB "Disable Zlib usage" OFF)
option(MRIOEXTRAS_OPENCASCADE_USE_XDE "Use OpenCASCADE XDE module" ON)

IF(MR_EMSCRIPTEN)
set(MRIOEXTRAS_NO_E57 ON)
set(MRIOEXTRAS_NO_PDF ON)
set(MRIOEXTRAS_NO_STEP ON)
ENDIF()
Expand Down
4 changes: 3 additions & 1 deletion thirdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,11 @@ ELSE() # not MR_EMSCRIPTEN
set(CLIP_X11_WITH_PNG OFF)
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
add_subdirectory(./clip)
add_subdirectory(./libE57Format)
file(GLOB CLIP_HEADERS "clip/*.h")
install(FILES ${CLIP_HEADERS} DESTINATION ${MESHLIB_THIRDPARTY_INCLUDE_DIR}/clip)

set(E57_XML_PARSER TinyXML2 CACHE STRING "")
add_subdirectory(./libE57Format)
ENDIF()

set(GLAD_INSTALL ON)
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/libE57Format
Submodule libE57Format updated 91 files
+6 −5 .github/workflows/build.yml
+4 −4 .github/workflows/format-check.yml
+4 −0 .gitignore
+41 −1 CHANGELOG.md
+64 −13 CMakeLists.txt
+4 −4 CONTRIBUTING.md
+24 −27 README.md
+1 −1 cmake/ClangFormat.cmake
+1 −1 cmake/CompilerWarnings.cmake
+1 −1 cmake/E57ExportHeader.cmake
+122 −0 cmake/GitInfo.cmake
+2 −2 cmake/Sanitizers.cmake
+3 −2 cmake/Tags.cmake
+1 −1 cmake/ccache.cmake
+1 −1 extern/CRCpp/CMakeLists.txt
+31 −2 extern/CRCpp/inc/CRC.h
+1 −1 include/CMakeLists.txt
+71 −68 include/E57Exception.h
+24 −22 include/E57Format.h
+11 −11 include/E57SimpleData.h
+9 −29 include/E57SimpleWriter.h
+1 −1 include/E57Version.h
+1 −1 src/ASTMVersion.h
+2 −2 src/BlobNode.cpp
+2 −4 src/BlobNodeImpl.cpp
+4 −1 src/CMakeLists.txt
+11 −14 src/CheckedFile.cpp
+1 −1 src/Common.h
+2 −2 src/CompressedVectorNode.cpp
+2 −2 src/CompressedVectorNodeImpl.cpp
+2 −2 src/CompressedVectorReader.cpp
+30 −17 src/CompressedVectorReaderImpl.cpp
+2 −2 src/CompressedVectorWriter.cpp
+83 −5 src/CompressedVectorWriterImpl.cpp
+3 −0 src/CompressedVectorWriterImpl.h
+1 −2 src/DecodeChannel.cpp
+4 −6 src/Decoder.cpp
+5 −2 src/E57Exception.cpp
+2 −7 src/E57SimpleData.cpp
+1 −0 src/E57SimpleWriter.cpp
+1 −1 src/E57Version.cpp
+140 −324 src/E57XmlParser.cpp
+69 −41 src/E57XmlParser.h
+331 −0 src/E57XmlParserImplExpat.cpp
+171 −0 src/E57XmlParserImplTinyXML2.cpp
+376 −0 src/E57XmlParserImplXerces.cpp
+7 −8 src/Encoder.cpp
+4 −3 src/FloatNode.cpp
+12 −12 src/FloatNodeImpl.cpp
+4 −3 src/FloatNodeImpl.h
+2 −2 src/ImageFile.cpp
+3 −1 src/ImageFileImpl.cpp
+1 −1 src/ImageFileImpl.h
+4 −3 src/IntegerNode.cpp
+10 −10 src/IntegerNodeImpl.cpp
+4 −2 src/IntegerNodeImpl.h
+2 −2 src/Node.cpp
+16 −40 src/Packet.cpp
+44 −1 src/Packet.h
+1 −1 src/ReaderImpl.cpp
+1 −1 src/ReaderImpl.h
+6 −2 src/ScaledIntegerNode.cpp
+12 −23 src/ScaledIntegerNodeImpl.cpp
+7 −6 src/ScaledIntegerNodeImpl.h
+10 −0 src/SectionHeaders.cpp
+2 −2 src/SourceDestBuffer.cpp
+4 −5 src/SourceDestBufferImpl.cpp
+1 −1 src/SourceDestBufferImpl.h
+2 −2 src/StringNode.cpp
+1 −2 src/StringNodeImpl.cpp
+1 −1 src/StringNodeImpl.h
+2 −2 src/StructureNode.cpp
+1 −2 src/StructureNodeImpl.cpp
+2 −2 src/VectorNode.cpp
+1 −2 src/VectorNodeImpl.cpp
+1 −1 src/VectorNodeImpl.h
+2 −2 src/WriterImpl.cpp
+6 −1 test/CMakeLists.txt
+1 −1 test/extern/googletest
+1 −1 test/include/CMakeLists.txt
+13 −2 test/include/Helpers.h
+1 −1 test/include/RandomNum.h
+1 −1 test/include/TestData.h
+1 −1 test/src/CMakeLists.txt
+1 −1 test/src/RandomNum.cpp
+1 −1 test/src/TestData.cpp
+1 −1 test/src/main.cpp
+1 −8 test/src/test_SimpleData.cpp
+111 −1 test/src/test_SimpleReader.cpp
+29 −1 test/src/test_SimpleWriter.cpp
+1 −1 test/src/test_StringFunctions.cpp
Loading