Skip to content

Commit

Permalink
Update to use Catch2 and new pugixml.
Browse files Browse the repository at this point in the history
  • Loading branch information
PerMalmberg committed Jun 26, 2019
1 parent 6bc65a5 commit bd4be95
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[submodule "externals/Catch"]
path = externals/Catch
url = https://github.com/philsquared/Catch.git
[submodule "pugixml"]
path = externals/pugixml
url = https://github.com/zeux/pugixml.git
[submodule "externals/CMakeUtils"]
path = externals/CMakeUtils
url = https://github.com/PerMalmberg/CMakeUtils.git
[submodule "externals/Catch2"]
path = externals/Catch2
url = [email protected]:catchorg/Catch2.git
48 changes: 48 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion CmdParser4Cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ endif ()
add_definitions(-DPUGIXML_NO_EXCEPTIONS)

include_directories("${CMAKE_CURRENT_LIST_DIR}/../externals/")
include_directories("dist/include")

set(SOURCE_FILES
src/Argument.cpp
Expand Down Expand Up @@ -51,6 +50,7 @@ set(SOURCE_FILES

# Create a static library
add_library(${PROJECT_NAME} STATIC ${SOURCE_FILES})
target_include_directories(${PROJECT_NAME} PUBLIC "dist/include")

# Output final binaries in the dist folder so they easily can be distributed together with the header files.
set_target_properties(${PROJECT_NAME}
Expand Down
15 changes: 8 additions & 7 deletions Test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
cmake_minimum_required(VERSION 3.4)
project(Test)

include(../externals/CMakeUtils/CMakeUtils.txt)
set(EXTERNALS ${CMAKE_CURRENT_LIST_DIR}/../externals)

include(${EXTERNALS}/CMakeUtils/CMakeUtils.txt)

if( IS_WINDOWS )
# Build at warning level 4 on Windows.
Expand All @@ -12,12 +14,6 @@ else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -std=c++11")
endif()

# Use CMAKE_CURRENT_LIST_DIR instead of CMAKE_SOURCE_DIR to specify relative to where this CMakeLists.txt is located
# as opposed to where the 'main' CMakeLists.txt file is located.
include_directories("${CMAKE_CURRENT_LIST_DIR}/../CmdParser4Cpp/dist/include")

include_directories("${CMAKE_CURRENT_LIST_DIR}/../externals")

set(SOURCE_FILES
main.cpp
Tests.cpp
Expand All @@ -30,6 +26,11 @@ set(SOURCE_FILES
add_executable(${PROJECT_NAME} ${SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} CmdParser4Cpp)

set(EXTERNALS ${CMAKE_CURRENT_LIST_DIR}/../externals)
target_include_directories(${PROJECT_NAME} PRIVATE
${EXTERNALS}/Catch2/single_include
${EXTERNALS})

# Output final binaries in the dist folder so they easily can be distributed together with the header files.
set_target_properties(${PROJECT_NAME}
PROPERTIES
Expand Down
2 changes: 1 addition & 1 deletion Test/Tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <cstring>
#include <iostream>
#include <fstream>
#include <Catch/include/catch.hpp>
#include <Catch2/include/catch.hpp>
#include <CmdParser4Cpp/XMLConfigurationReader.h>
#include <CmdParser4Cpp/UnboundStringLength.h>
#include "SystemOutputParseResult.h"
Expand Down
2 changes: 1 addition & 1 deletion Test/main.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file

#include "Catch/include/catch.hpp"
#include <catch2/catch.hpp>
1 change: 0 additions & 1 deletion externals/Catch
Submodule Catch deleted from 92b141
1 change: 1 addition & 0 deletions externals/Catch2
Submodule Catch2 added at 2f631b
2 changes: 1 addition & 1 deletion externals/pugixml
Submodule pugixml updated 78 files
+2 −0 .codecov.yml
+2 −1 .gitignore
+13 −3 .travis.yml
+33 −13 CMakeLists.txt
+12 −14 Makefile
+2 −2 README.md
+8 −9 appveyor.yml
+ docs/images/dom_tree.png
+61 −14 docs/manual.adoc
+474 −305 docs/manual.html
+6 −6 docs/quickstart.adoc
+69 −54 docs/quickstart.html
+3 −3 readme.txt
+53 −0 scripts/archive.py
+0 −32 scripts/nuget.autopkg
+15 −0 scripts/nuget/build/native/pugixml-propertiesui.xml
+27 −0 scripts/nuget/build/native/pugixml.targets
+21 −0 scripts/nuget/pugixml.nuspec
+0 −9 scripts/nuget_build.bat
+48 −0 scripts/nuget_build.ps1
+11 −0 scripts/pugixml.pc.in
+2 −2 scripts/pugixml.podspec
+14 −14 scripts/pugixml_vs2010.vcxproj
+20 −20 scripts/pugixml_vs2010_static.vcxproj
+19 −19 scripts/pugixml_vs2013.vcxproj
+25 −25 scripts/pugixml_vs2013_static.vcxproj
+176 −0 scripts/pugixml_vs2015_static.vcxproj
+172 −0 scripts/pugixml_vs2017.vcxproj
+176 −0 scripts/pugixml_vs2017_static.vcxproj
+3 −3 src/pugiconfig.hpp
+825 −563 src/pugixml.cpp
+70 −22 src/pugixml.hpp
+5 −1 tests/allocator.cpp
+0 −72 tests/archive.pl
+11 −2 tests/autotest-appveyor.ps1
+0 −8 tests/common.hpp
+1 −0 tests/data_fuzz_xpath/basic.xpath
+1 −0 tests/data_fuzz_xpath/functions.xpath
+1 −0 tests/data_fuzz_xpath/math.xpath
+1 −0 tests/data_fuzz_xpath/path.xpath
+1 −0 tests/data_fuzz_xpath/predicate.xpath
+8 −10 tests/fuzz_parse.cpp
+72 −0 tests/fuzz_parse.dict
+11 −0 tests/fuzz_setup.sh
+26 −0 tests/fuzz_xpath.cpp
+72 −0 tests/fuzz_xpath.dict
+1 −1 tests/helpers.hpp
+4 −3 tests/main.cpp
+5 −1 tests/test.hpp
+150 −0 tests/test_compact.cpp
+25 −0 tests/test_deprecated.cpp
+491 −78 tests/test_document.cpp
+25 −11 tests/test_dom_modify.cpp
+3 −1 tests/test_dom_text.cpp
+42 −19 tests/test_dom_traverse.cpp
+3 −1 tests/test_header_only_1.cpp
+3 −1 tests/test_header_only_2.cpp
+9 −7 tests/test_memory.cpp
+189 −16 tests/test_parse.cpp
+3 −1 tests/test_parse_doctype.cpp
+3 −1 tests/test_unicode.cpp
+1 −1 tests/test_version.cpp
+76 −9 tests/test_write.cpp
+174 −23 tests/test_xpath.cpp
+20 −16 tests/test_xpath_api.cpp
+43 −1 tests/test_xpath_functions.cpp
+13 −1 tests/test_xpath_operators.cpp
+79 −3 tests/test_xpath_parse.cpp
+85 −1 tests/test_xpath_paths.cpp
+3 −1 tests/test_xpath_paths_abbrev_w3c.cpp
+3 −1 tests/test_xpath_paths_w3c.cpp
+65 −2 tests/test_xpath_variables.cpp
+3 −1 tests/test_xpath_xalan_1.cpp
+3 −1 tests/test_xpath_xalan_2.cpp
+3 −1 tests/test_xpath_xalan_3.cpp
+3 −1 tests/test_xpath_xalan_4.cpp
+3 −1 tests/test_xpath_xalan_5.cpp
+1 −1 tests/writer_string.hpp

0 comments on commit bd4be95

Please sign in to comment.