summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/pugixml
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-11-03 20:13:19 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2016-11-03 20:13:19 +0100
commit093609dc0c1fd89d5129af504623732b6ade71a7 (patch)
treef8351a1ab444b19f8c5b4e61062f8a4e0a91bbb2 /3rdparty/pugixml
parent07c8a7f1a9669436b28e819ffc67a4d7e8cfafe6 (diff)
Update pugixml library, no override patches anymore (nw)
Diffstat (limited to '3rdparty/pugixml')
-rw-r--r--3rdparty/pugixml/.gitignore1
-rw-r--r--3rdparty/pugixml/CMakeLists.txt23
-rw-r--r--3rdparty/pugixml/docs/quickstart.adoc2
-rw-r--r--3rdparty/pugixml/scripts/pugixml.pc.in11
-rw-r--r--3rdparty/pugixml/src/pugixml.hpp15
-rw-r--r--3rdparty/pugixml/tests/test.hpp2
-rw-r--r--3rdparty/pugixml/tests/test_document.cpp2
-rw-r--r--3rdparty/pugixml/tests/test_dom_traverse.cpp6
-rw-r--r--3rdparty/pugixml/tests/test_write.cpp4
-rw-r--r--3rdparty/pugixml/tests/writer_string.hpp2
10 files changed, 50 insertions, 18 deletions
diff --git a/3rdparty/pugixml/.gitignore b/3rdparty/pugixml/.gitignore
index 567609b1234..01f9cb9fbe0 100644
--- a/3rdparty/pugixml/.gitignore
+++ b/3rdparty/pugixml/.gitignore
@@ -1 +1,2 @@
build/
+.vscode/ \ No newline at end of file
diff --git a/3rdparty/pugixml/CMakeLists.txt b/3rdparty/pugixml/CMakeLists.txt
index 018e728eaf2..3dbdd6f00e2 100644
--- a/3rdparty/pugixml/CMakeLists.txt
+++ b/3rdparty/pugixml/CMakeLists.txt
@@ -4,6 +4,8 @@ cmake_minimum_required(VERSION 2.6)
option(BUILD_SHARED_LIBS "Build shared instead of static library" OFF)
option(BUILD_TESTS "Build tests" OFF)
+option(BUILD_PKGCONFIG "Build in PKGCONFIG mode" OFF)
+
set(BUILD_DEFINES "" CACHE STRING "Build defines")
if(MSVC)
@@ -46,16 +48,25 @@ if(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} STRLESS 3.1 AND ";${CMAKE_C
endif()
set_target_properties(pugixml PROPERTIES VERSION 1.7 SOVERSION 1)
+get_target_property(PUGIXML_VERSION_STRING pugixml VERSION)
-install(TARGETS pugixml EXPORT pugixml-config
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
-)
+if(BUILD_PKGCONFIG)
+ # Install library into its own directory under LIBDIR
+ set(INSTALL_SUFFIX /pugixml-${PUGIXML_VERSION_STRING})
+endif()
-install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+install(TARGETS pugixml EXPORT pugixml-config
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${INSTALL_SUFFIX}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${INSTALL_SUFFIX}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}${INSTALL_SUFFIX})
install(EXPORT pugixml-config DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml)
+if(BUILD_PKGCONFIG)
+ configure_file(scripts/pugixml.pc.in ${PROJECT_BINARY_DIR}/pugixml.pc @ONLY)
+ install(FILES ${PROJECT_BINARY_DIR}/pugixml.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
+endif()
+
if(BUILD_TESTS)
file(GLOB TEST_SOURCES tests/*.cpp)
file(GLOB FUZZ_SOURCES tests/fuzz_*.cpp)
diff --git a/3rdparty/pugixml/docs/quickstart.adoc b/3rdparty/pugixml/docs/quickstart.adoc
index 3fe29b103a1..fe5eac63474 100644
--- a/3rdparty/pugixml/docs/quickstart.adoc
+++ b/3rdparty/pugixml/docs/quickstart.adoc
@@ -25,7 +25,7 @@ The distribution contains library source, documentation (the guide you're readin
The complete pugixml source consists of three files - one source file, `pugixml.cpp`, and two header files, `pugixml.hpp` and `pugiconfig.hpp`. `pugixml.hpp` is the primary header which you need to include in order to use pugixml classes/functions. The rest of this guide assumes that `pugixml.hpp` is either in the current directory or in one of include directories of your projects, so that `#include "pugixml.hpp"` can find the header; however you can also use relative path (i.e. `#include "../libs/pugixml/src/pugixml.hpp"`) or include directory-relative path (i.e. `#include <xml/thirdparty/pugixml/src/pugixml.hpp>`).
-The easiest way to build pugixml is to compile the source file, `pugixml.cpp`, along with the existing library/executable. This process depends on the method of building your application; for example, if you're using Microsoft Visual Studio footnote:[All trademarks used are properties of their respective owners.], Apple Xcode, Code::Blocks or any other IDE, just add `pugixml.cpp` to one of your projects. There are other building methods available, including building pugixml as a standalone static/shared library; link:manual/install.html#install.building[read the manual] for further information.
+The easiest way to build pugixml is to compile the source file, `pugixml.cpp`, along with the existing library/executable. This process depends on the method of building your application; for example, if you're using Microsoft Visual Studio footnote:[All trademarks used are properties of their respective owners.], Apple Xcode, Code::Blocks or any other IDE, just add `pugixml.cpp` to one of your projects. There are other building methods available, including building pugixml as a standalone static/shared library; link:manual.html#install.building[read the manual] for further information.
[[dom]]
== Document object model
diff --git a/3rdparty/pugixml/scripts/pugixml.pc.in b/3rdparty/pugixml/scripts/pugixml.pc.in
new file mode 100644
index 00000000000..3c97c28d2fa
--- /dev/null
+++ b/3rdparty/pugixml/scripts/pugixml.pc.in
@@ -0,0 +1,11 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+includedir=${prefix}/include/pugixml-@PUGIXML_VERSION_STRING@
+libdir=${exec_prefix}/lib/pugixml-@PUGIXML_VERSION_STRING@
+
+Name: pugixml
+Description: Light-weight, simple and fast XML parser for C++ with XPath support.
+URL: http://pugixml.org/
+Version: @PUGIXML_VERSION_STRING@
+Cflags: -I${includedir}
+Libs: -L${libdir} -lpugixml \ No newline at end of file
diff --git a/3rdparty/pugixml/src/pugixml.hpp b/3rdparty/pugixml/src/pugixml.hpp
index 9c41b14643c..c4d44e6fbee 100644
--- a/3rdparty/pugixml/src/pugixml.hpp
+++ b/3rdparty/pugixml/src/pugixml.hpp
@@ -72,6 +72,15 @@
# endif
#endif
+// If C++ is 2011 or higher, add 'override' qualifiers
+#ifndef PUGIXML_OVERRIDE
+# if __cplusplus >= 201103
+# define PUGIXML_OVERRIDE override
+# else
+# define PUGIXML_OVERRIDE
+# endif
+#endif
+
// Character interface macros
#ifdef PUGIXML_WCHAR_MODE
# define PUGIXML_TEXT(t) L ## t
@@ -273,7 +282,7 @@ namespace pugi
// Construct writer from a FILE* object; void* is used to avoid header dependencies on stdio
xml_writer_file(void* file);
- virtual void write(const void* data, size_t size) override;
+ virtual void write(const void* data, size_t size) PUGIXML_OVERRIDE;
private:
void* file;
@@ -288,7 +297,7 @@ namespace pugi
xml_writer_stream(std::basic_ostream<char, std::char_traits<char> >& stream);
xml_writer_stream(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& stream);
- virtual void write(const void* data, size_t size) override;
+ virtual void write(const void* data, size_t size) PUGIXML_OVERRIDE;
private:
std::basic_ostream<char, std::char_traits<char> >* narrow_stream;
@@ -1214,7 +1223,7 @@ namespace pugi
explicit xpath_exception(const xpath_parse_result& result);
// Get error message
- virtual const char* what() const throw() override;
+ virtual const char* what() const throw() PUGIXML_OVERRIDE;
// Get parse result
const xpath_parse_result& result() const;
diff --git a/3rdparty/pugixml/tests/test.hpp b/3rdparty/pugixml/tests/test.hpp
index e700826ad96..f88c909c3c2 100644
--- a/3rdparty/pugixml/tests/test.hpp
+++ b/3rdparty/pugixml/tests/test.hpp
@@ -78,7 +78,7 @@ struct dummy_fixture {};
{ \
test_runner_##name(): test_runner(#name) {} \
\
- virtual void run() \
+ virtual void run() PUGIXML_OVERRIDE \
{ \
test_runner_helper_##name helper; \
helper.run(); \
diff --git a/3rdparty/pugixml/tests/test_document.cpp b/3rdparty/pugixml/tests/test_document.cpp
index 73a36f561ff..c7219e1b92b 100644
--- a/3rdparty/pugixml/tests/test_document.cpp
+++ b/3rdparty/pugixml/tests/test_document.cpp
@@ -187,7 +187,7 @@ public:
this->setg(begin, begin, end);
}
- typename std::basic_streambuf<T>::int_type underflow()
+ typename std::basic_streambuf<T>::int_type underflow() PUGIXML_OVERRIDE
{
return this->gptr() == this->egptr() ? std::basic_streambuf<T>::traits_type::eof() : std::basic_streambuf<T>::traits_type::to_int_type(*this->gptr());
}
diff --git a/3rdparty/pugixml/tests/test_dom_traverse.cpp b/3rdparty/pugixml/tests/test_dom_traverse.cpp
index 25774a585af..f977e1515ea 100644
--- a/3rdparty/pugixml/tests/test_dom_traverse.cpp
+++ b/3rdparty/pugixml/tests/test_dom_traverse.cpp
@@ -798,7 +798,7 @@ struct test_walker: xml_tree_walker
#endif
}
- virtual bool begin(xml_node& node)
+ virtual bool begin(xml_node& node) PUGIXML_OVERRIDE
{
log += STR("|");
log += depthstr();
@@ -810,7 +810,7 @@ struct test_walker: xml_tree_walker
return ++call_count != stop_count && xml_tree_walker::begin(node);
}
- virtual bool for_each(xml_node& node)
+ virtual bool for_each(xml_node& node) PUGIXML_OVERRIDE
{
log += STR("|");
log += depthstr();
@@ -822,7 +822,7 @@ struct test_walker: xml_tree_walker
return ++call_count != stop_count && xml_tree_walker::end(node);
}
- virtual bool end(xml_node& node)
+ virtual bool end(xml_node& node) PUGIXML_OVERRIDE
{
log += STR("|");
log += depthstr();
diff --git a/3rdparty/pugixml/tests/test_write.cpp b/3rdparty/pugixml/tests/test_write.cpp
index 341a4f0f971..bf45e313977 100644
--- a/3rdparty/pugixml/tests/test_write.cpp
+++ b/3rdparty/pugixml/tests/test_write.cpp
@@ -213,7 +213,7 @@ struct test_writer: xml_writer
{
std::basic_string<pugi::char_t> contents;
- virtual void write(const void* data, size_t size)
+ virtual void write(const void* data, size_t size) PUGIXML_OVERRIDE
{
CHECK(size % sizeof(pugi::char_t) == 0);
contents.append(static_cast<const pugi::char_t*>(data), size / sizeof(pugi::char_t));
@@ -604,7 +604,7 @@ TEST_XML_FLAGS(write_mixed, "<node><child1/><child2>pre<![CDATA[data]]>mid<!--co
#ifndef PUGIXML_NO_EXCEPTIONS
struct throwing_writer: pugi::xml_writer
{
- virtual void write(const void*, size_t)
+ virtual void write(const void*, size_t) PUGIXML_OVERRIDE
{
throw std::runtime_error("write failed");
}
diff --git a/3rdparty/pugixml/tests/writer_string.hpp b/3rdparty/pugixml/tests/writer_string.hpp
index 0c1089d818a..539377c939e 100644
--- a/3rdparty/pugixml/tests/writer_string.hpp
+++ b/3rdparty/pugixml/tests/writer_string.hpp
@@ -9,7 +9,7 @@ struct xml_writer_string: public pugi::xml_writer
{
std::string contents;
- virtual void write(const void* data, size_t size);
+ virtual void write(const void* data, size_t size) PUGIXML_OVERRIDE;
std::string as_narrow() const;
std::basic_string<wchar_t> as_wide() const;