aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-12-18Merge pull request #391 from zeux/cmake-omgv1.11.3Arseny Kapoulkine1-1/+2
Fix compatibility issue with CMake 3.10
2020-12-18Fix compatibility issue with CMake 3.10Arseny Kapoulkine1-1/+2
target_link_libraries/INTERFACE doesn't seem to work on CMake 3.10, but directly setting the property does work. Fixes #390.
2020-12-14Merge pull request #389 from mathstuf/fix-alias-compat-targetv1.11.2Arseny Kapoulkine1-1/+2
cmake: avoid ALIAS target
2020-12-10cmake: avoid ALIAS targetBen Boeckel1-1/+2
This is not allowed on IMPORTED targets.
2020-12-04docs: Rebuild HTML documentationv1.11.1Arseny Kapoulkine1-1/+11
2020-12-04Merge pull request #384 from mathstuf/update-1.11-release-notesArseny Kapoulkine2-0/+10
Update 1.11 release notes
2020-12-02docs: add a note about the new imported target name for CMakeBen Boeckel1-0/+3
2020-12-02cmake: provide a compatibility target for usersBen Boeckel1-0/+7
For users using older pugixml releases, add an ALIAS target which works with the new versions too.
2020-11-26scripts: Convert archive.py to Python 3v1.11Arseny Kapoulkine2-7/+7
The changes are mostly mechanically converting str to bytes.
2020-11-26scripts: Remove deprecated iconUrl from NuGet packageArseny Kapoulkine1-1/+0
The logo.svg link is dead anyway.
2020-11-26Update copyright year to 2020 everywhereArseny Kapoulkine11-20/+20
2020-11-25Merge pull request #383 from zeux/next-releaseArseny Kapoulkine12-300/+394
Update version to 1.11 and update documentation
2020-11-25Update version to 1.11 and update documentationArseny Kapoulkine12-300/+394
2020-11-25tests: Fix test fallout for MSVC6Arseny Kapoulkine1-0/+2
One more XPath test falls prey to MSVC6 NaN comparison codegen issues.
2020-11-25Fix -Wshadow in remove_children()Arseny Kapoulkine1-4/+4
child variable was shadowing xml_node::child
2020-11-25Merge pull request #382 from zeux/TheNicker-masterArseny Kapoulkine1-2/+17
Fix MSVC deprecation warnings when using clang-cl
2020-11-25Cleanup code and feature detectionArseny Kapoulkine1-42/+15
We now use open_file similarly to open_file_wide, and activate the workaround for MSVC 2005+ since that's when the _s versions were added in the first place.
2020-10-26Merge pull request #376 from jjmccollum/mingw-dll-fixArseny Kapoulkine1-1/+1
Added fix to pugixml_dll.rc so shared lib can be built with MinGW
2020-10-26Added fix to pugixml_dll.rc so shared lib can be built with MinGWJames McCollum1-1/+1
2020-09-11Merge pull request #370 from zeux/xpath-recArseny Kapoulkine2-0/+8
XPath: Fix stack overflow in functions with long argument lists
2020-09-11XPath: Fix stack overflow in functions with long argument listsArseny Kapoulkine2-0/+8
Function call arguments are stored in a list which is processed recursively during optimize(). We now limit the depth of this construct as well to make sure optimize() doesn't run out of stack space.
2020-09-10Merge pull request #369 from zeux/xpath-recArseny Kapoulkine3-2/+77
XPath: Restrict AST depth to prevent stack overflow
2020-09-10Fix stack overflow in tests on MSVC x64Arseny Kapoulkine3-2/+5
The default stack on MSVC/x64/debug is sufficient for 1692 nested invocations only, whereas on clang/linux it's ~8K... For now set the limit to be conservative.
2020-09-10Fix tests in wchar modeArseny Kapoulkine1-5/+5
2020-09-10XPath: Restrict AST depth to prevent stack overflowArseny Kapoulkine2-2/+74
XPath parser and execution engine isn't stackless; the depth of the query controls the amount of C stack space required. This change instruments places in the parser where the control flow can recurse, requiring too much C stack space to produce an AST, or where a stackless parse is used to produce arbitrarily deep AST which will create issues for downstream processing. As a result XPath parser should now be fuzz safe for malicious inputs.
2020-07-21Replaced fopen and _wfopen deprecated functions with the safer fopen_s and ↵Lior Lahav1-0/+42
_wfopen_s
2020-07-15Merge pull request #363 from c72578/2020-07-15_Fix_pkgconfig_lib_postfixArseny Kapoulkine2-1/+11
Fix debug postfix in pkgconfig file
2020-07-15Fix debug postfix in pkgconfig fileWolfgang Stöggl2-1/+11
In case of USE_POSTFIX, the POSTFIX is dependent on the CMAKE_BUILD_TYPE. Use the correct POSTFIX also in the generated pugixml.pc file. This results in the following contents of pugixml.pc: - Release: Libs: -L${libdir} -lpugixml - RelWithDebInfo Libs: -L${libdir} -lpugixml_r - MinSizeRel: Libs: -L${libdir} -lpugixml_m - Debug: Libs: -L${libdir} -lpugixml_d
2020-07-06Merge pull request #360 from julianxhokaxhiu/patch-1Arseny Kapoulkine1-3/+0
[Cmake] Static build should not export APIs
2020-07-06Merge pull request #361 from zeux/ps-stderrArseny Kapoulkine1-2/+2
Fix PowerShell errors on stderr
2020-07-06Fix PowerShell errors on stderrArseny Kapoulkine1-2/+2
PS invocation of code coverage upload gets triggered because of stderr output from curl with progress report when uploading coverage.
2020-07-06[Cmake] Static build should not export APIsJulian Xhokaxhiu1-3/+0
Fixes #359
2020-06-13Work around a false positive in MSVC debug runtime checkerArseny Kapoulkine1-1/+1
In some MSVC versions on x64 configurations, the hashing function triggers this failure: Run-Time Check Failure #1 - A cast to a smaller data type has caused a loss of data. If this was intentional, you should mask the source of the cast with the appropriate bitmask. This is similar to the integer sanitizer - this code is valid C++ but MSVC decides to warn about this nonetheless. Masking the pointer's low 32 bits fixes the issue. Fixes #357.
2020-05-11Merge pull request #353 from jhasse/nullptr-in-headerArseny Kapoulkine1-4/+13
Use nullptr in pugixml.hpp if available, see #91
2020-05-10Use nullptr in pugixml.hpp if available, see #91Jan Niklas Hasse1-4/+13
2020-05-02Clarify the document element behavior.Arseny Kapoulkine1-2/+3
pugixml currently unconditionally accepts documents with multiple top-level element nodes in absence of parse_fragment. This is an unfortunate omission; while it can be corrected, it will result in regressions for some users, and it's trivial to perform the validity check after the parse is done. Because of this, for now we're just going to amend documentation here to both highlight this in the W3C Conformance section, but also to more strongly push users into realizing that there's just a single document element (normally). We might decide to change the behavior here to prohibit such documents by default in the future, but for now a documentation change seems like a better tradeoff. Fixes #337
2020-05-02Merge pull request #349 from KyleFromKitware/cmake-improvementsArseny Kapoulkine1-78/+83
Various CMake improvements
2020-04-27Export targets from build directoryKyle Edwards1-0/+3
This will allow projects to use pugixml from its build directory rather than having to install it.
2020-04-27Merge pull request #348 from rip-nsk/source_and_header-only_linkage_optionsArseny Kapoulkine3-9/+13
Add "Include pugixml.cpp" and "Header Only" linkage options
2020-04-27Use COMPONENT arguments in install() commandsKyle Edwards1-7/+23
2020-04-27Fix multiple-rules-for-target errorKyle Edwards1-71/+57
The old logic for BUILD_SHARED_LIBS and BUILD_SHARED_AND_STATIC_LIBS would produce two targets with the same name and different build rules. The Makefile generator tolerated this, but the Ninja generator raised an error. Fix the logic so that only one shared and one static target gets built, and make the pugixml target an ALIAS of the one dictated by BUILD_SHARED_LIBS.
2020-04-24Add "Include pugixml.cpp" and "Header Only" linkage optionsrip.nsk3-9/+13
2020-02-19Adjust node_copy_tree to be more explicit about invariantsArseny Kapoulkine1-2/+9
The loop traverses the source tree and simultaneously builds up a copy of it at destination. Short of race conditions, this code is safe - however, it's not obvious that dit stays inside the destination tree. This change adds a few assertions to help enforce/document these invariants. One particular subtlety is that dit can actually *become* null after we exit out of the loop, but it's guaranteed to only do so once sit goes back to sn. This is only possible when doing a full document copy - for some reason we weren't using this for that (in reset(xml_document)), but we are now. Fixes #314.
2020-02-19XPath: Remove the use of fallthrough switch casesArseny Kapoulkine1-67/+72
We were previously relying on non-standard comment detection that is supported by gcc/clang to avoid warnings about implicit fallthrough. This can be solved using attributes but using them requires a lot of compiler-specific detection logic because not all versions of gcc/clang support them. We don't *really* need to rely on fallthrough here - the type conversion block can be located *after* the AST type switch instead, which means that any AST type that has type ambiguity can fall back to that in the future. Fixes #331.
2020-02-07Merge pull request #330 from LocutusOfBorg/patch-2Arseny Kapoulkine1-1/+2
Update CMakeLists.txt to rename the static and shared libraries to pugixml
2020-02-07Update CMakeLists.txt to rename the static and shared libraries to pugixmlGianfranco Costamagna1-1/+2
Don't call them pugixml-shared or pugixml-static, because this breaks pkgconfig calls and userspace tools.
2020-02-01XPath: Add a clarification comment for ast_variable fallthroughArseny Kapoulkine1-0/+8
2020-02-01tests: Add a dedicated test for XPath variable conversionArseny Kapoulkine1-0/+26
This makes sure all conversions work as expected (note that no type can be converted to node set so we don't check that).
2019-12-20Merge pull request #316 from BotellaA/patch-1Arseny Kapoulkine1-0/+1
Add POSITION_INDEPENDENT_CODE option
2019-12-06Add POSITION_INDEPENDENT_CODE option Arnaud Botella1-0/+1
Allow to use the static library in other dynamic librairies. This is a standard cmake option https://cmake.org/cmake/help/v3.11/prop_tgt/POSITION_INDEPENDENT_CODE.html#prop_tgt:POSITION_INDEPENDENT_CODE