Skip to content

Commit

Permalink
Fixed compile.sh and added CMake script. Added pugixml
Browse files Browse the repository at this point in the history
  • Loading branch information
mortalisk committed Dec 16, 2013
1 parent 9cf41af commit 54dd525
Show file tree
Hide file tree
Showing 7 changed files with 11,622 additions and 1 deletion.
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
cmake_minimum_required(VERSION 2.8)
project(xtpath)

add_subdirectory("external/pugi")

include_directories("external/boost/include")
include_directories("external")
link_directories("${xtpath_SOURCE_DIR}/external/boost/lib")
add_definitions(-std=c++11)
add_executable(testpugi test/test_xpath.cpp)

target_link_libraries (testpugi pugixml boost_unit_test_framework)
2 changes: 1 addition & 1 deletion compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
#g++ justpugi.cpp namespace_util.cpp -L. -lpugi -I. -std=c++11 -o justpugi -O3
#g++ xtpathpugi.cpp -L. -lpugi -I. -std=c++11 -o xtpathpugi -O3

g++ test/test_xpath.cpp -L. -lpugi -lboost_unit_test_framework -I. -std=c++11 -o testpugi
g++ test/test_xpath.cpp -Lexternal/boost/lib -L. -lpugixml -lboost_unit_test_framework -Iexternal/boost/include/ -Iexternal -I. -std=c++11 -o testpugi

5 changes: 5 additions & 0 deletions external/pugi/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
project(pugixml)

set(SOURCES pugixml.cpp)

add_library(pugixml STATIC ${SOURCES})
69 changes: 69 additions & 0 deletions external/pugi/pugiconfig.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/**
* pugixml parser - version 1.2
* --------------------------------------------------------
* Copyright (C) 2006-2012, by Arseny Kapoulkine ([email protected])
* Report bugs and download new versions at http://pugixml.org/
*
* This library is distributed under the MIT License. See notice at the end
* of this file.
*
* This work is based on the pugxml parser, which is:
* Copyright (C) 2003, by Kristen Wegner ([email protected])
*/

#ifndef HEADER_PUGICONFIG_HPP
#define HEADER_PUGICONFIG_HPP

// Uncomment this to enable wchar_t mode
// #define PUGIXML_WCHAR_MODE

// Uncomment this to disable XPath
// #define PUGIXML_NO_XPATH

// Uncomment this to disable STL
// #define PUGIXML_NO_STL

// Uncomment this to disable exceptions
// #define PUGIXML_NO_EXCEPTIONS

// Set this to control attributes for public classes/functions, i.e.:
// #define PUGIXML_API __declspec(dllexport) // to export all public symbols from DLL
// #define PUGIXML_CLASS __declspec(dllimport) // to import all classes from DLL
// #define PUGIXML_FUNCTION __fastcall // to set calling conventions to all public functions to fastcall
// In absence of PUGIXML_CLASS/PUGIXML_FUNCTION definitions PUGIXML_API is used instead

// Uncomment this to switch to header-only version
// #define PUGIXML_HEADER_ONLY
// #include "pugixml.cpp"

// Tune these constants to adjust memory-related behavior
// #define PUGIXML_MEMORY_PAGE_SIZE 32768
// #define PUGIXML_MEMORY_OUTPUT_STACK 10240
// #define PUGIXML_MEMORY_XPATH_PAGE_SIZE 4096

#endif

/**
* Copyright (c) 2006-2012 Arseny Kapoulkine
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
Loading

0 comments on commit 54dd525

Please sign in to comment.