Commit 69b8710e authored by Chris Cantwell's avatar Chris Cantwell

Updated Tinyxml to built as separate ThirdParty library.

parent f2241764
......@@ -6,34 +6,34 @@ OPTION(THIRDPARTY_BUILD_TINYXML
"Build TinyXML library from ThirdParty." ON)
IF (THIRDPARTY_BUILD_TINYXML)
#SET(TINYXML_DIR ${TPSRC}/tinyxml)
#EXTERNALPROJECT_ADD(
# tinyxml
# PREFIX ${TPSRC}/build
# URL ${TPSRC}/tinyxml.tar.bz2
# URL_MD5 "aec842139928e65aa7abdff6de0a09ec"
# CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX: PATH=${TPSRC}/ #build/dist ${TPSRC}/build/src/tinyxml
#)
#SET(TINYXML_LIB ${TPSRC}/build/dist/lib/libtinyxml.so)
#SET(TINYXML_BASE ${TPSRC}/build/src)
# Tiny XML
IF (NOT EXISTS ${TPSRC}/tinyxml_2_4_3.tar.bz2)
FILE(DOWNLOAD ${TPURL}/tinyxml_2_4_3.tar.bz2
${TPSRC}/tinyxml_2_4_3.tar.bz2)
ENDIF()
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar jxf ${TPSRC}/tinyxml_2_4_3.tar.bz2
WORKING_DIRECTORY ${TPSRC}
INCLUDE(ExternalProject)
EXTERNALPROJECT_ADD(
tinyxml-2.4.3
PREFIX ${TPSRC}
URL ${TPSRC}/tinyxml_2_4_3.tar.bz2
URL_MD5 "aec842139928e65aa7abdff6de0a09ec"
DOWNLOAD_DIR ${TPSRC}
CONFIGURE_COMMAND ${CMAKE_COMMAND}
-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
-DCMAKE_INSTALL_PREFIX:PATH=${TPSRC}/dist
-DCMAKE_CXX_FLAGS:STRING=-DTIXML_USE_STL
${TPSRC}/src/tinyxml-2.4.3
INSTALL_COMMAND $(MAKE) install
COMMAND ${CMAKE_COMMAND} -E copy
${TPSRC}/src/tinyxml-2.4.3/tinyxml.h
${TPSRC}/dist/include/tinyxml.h
)
SET(TINYXML_INCLUDE_DIR ${TPSRC}/tinyxml)
SET(TINYXML_BASE ${TPSRC})
SET(TINYXML_SRC_DIR ${TPSRC}/tinyxml)
SET(TINYXML_LIB ${TPSRC}/dist/lib/libtinyxml.so CACHE FILEPATH
"Tinyxml library" FORCE)
MARK_AS_ADVANCED(TINYXML_LIB)
LINK_DIRECTORIES(${TPSRC}/dist/lib)
INCLUDE_DIRECTORIES(${TPSRC}/dist/include)
MESSAGE(STATUS "Build TinyXML: ${TPSRC}/dist/lib/lib${TINYXML_LIB}.so")
ELSE (THIRDPARTY_BUILD_TINYXML)
INCLUDE (FindTinyXml)
ENDIF (THIRDPARTY_BUILD_TINYXML)
SET(TINYXML_LIB tinyxml)
INCLUDE_DIRECTORIES(SYSTEM ${TINYXML_BASE})
......@@ -42,7 +42,7 @@
#include <LibUtilities/BasicUtils/ShapeType.hpp>
#include <LibUtilities/Foundations/Basis.h>
#include <LibUtilities/Foundations/Points.h>
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
// These are required for the Write(...) and Import(...) functions.
#include <boost/archive/iterators/base64_from_binary.hpp>
......
......@@ -45,7 +45,7 @@
#include <vector>
#include <map>
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
#include <LibUtilities/BasicUtils/ParseUtils.hpp>
#include <LibUtilities/BasicUtils/SessionReader.h>
......
......@@ -48,7 +48,7 @@ using namespace std;
#include <boost/iostreams/copy.hpp>
#include <boost/iostreams/filter/gzip.hpp>
#include <boost/algorithm/string.hpp>
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
#include <LibUtilities/BasicUtils/ErrorUtil.hpp>
#include <LibUtilities/BasicUtils/Equation.h>
#include <LibUtilities/Memory/NekMemoryManager.hpp>
......
......@@ -348,7 +348,7 @@ ADD_DEFINITIONS(-DLIB_UTILITIES_EXPORTS)
ADD_NEKTAR_LIBRARY(LibUtilities lib ${NEKTAR_LIBRARY_TYPE} ${LibUtilitySources} ${LibUtilityHeaders})
ADD_DEPENDENCIES(LibUtilities modmetis-5.1.0 boost tinyxml zlib-1.2.7)
ADD_DEPENDENCIES(LibUtilities modmetis-5.1.0 boost tinyxml-2.4.3 zlib-1.2.7)
### Libraries needed specifically by LibUtilities ###
......@@ -384,8 +384,7 @@ TARGET_LINK_LIBRARIES(LibUtilities LINK_PUBLIC
)
# TinyXML
TARGET_LINK_LIBRARIES(LibUtilities LINK_PRIVATE ${TINYXML_LIB})
TARGET_LINK_LIBRARIES(LibUtilities LINK_PUBLIC ${TINYXML_LIB})
IF( ${CMAKE_SYSTEM} MATCHES "Linux.*" )
TARGET_LINK_LIBRARIES(LibUtilities LINK_PUBLIC rt)
ENDIF()
......
......@@ -50,7 +50,7 @@
#include <LibUtilities/Communication/Transposition.h>
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
namespace Nektar
{
......
......@@ -36,7 +36,7 @@
#ifndef TIXML_USE_STL
#define TIXML_USE_STL
#endif
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
#include <MultiRegions/GlobalOptimizationParameters.h>
namespace Nektar
......
......@@ -51,19 +51,6 @@ TriGeom.h
SpatialDomains.hpp
)
SET(TINYXML_SOURCES
${TINYXML_SRC_DIR}/tinyxml.cpp
${TINYXML_SRC_DIR}/tinyxmlparser.cpp
${TINYXML_SRC_DIR}/tinyxmlerror.cpp
${TINYXML_SRC_DIR}/tinystr.cpp
)
SET(TINYXML_HEADERS
${TINYXML_INCLUDE_DIR}/tinystr.h
${TINYXML_INCLUDE_DIR}/tinyxml.h
)
ADD_DEFINITIONS(-DSPATIAL_DOMAINS_EXPORTS)
ADD_NEKTAR_LIBRARY(SpatialDomains lib ${NEKTAR_LIBRARY_TYPE} ${SPATIAL_DOMAINS_SOURCES} ${SPATIAL_DOMAINS_HEADERS})
......@@ -71,6 +58,3 @@ ADD_NEKTAR_LIBRARY(SpatialDomains lib ${NEKTAR_LIBRARY_TYPE} ${SPATIAL_DOMAINS_S
TARGET_LINK_LIBRARIES(SpatialDomains StdRegions LibUtilities)
INSTALL(DIRECTORY ./ DESTINATION ${NEKTAR_INCLUDE_DIR}/SpatialDomains COMPONENT dev FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp")
ADD_NEKTAR_LIBRARY(tinyxml lib STATIC ${TINYXML_SOURCES} ${TINYXML_HEADERS})
......@@ -36,7 +36,7 @@
#include <LibUtilities/BasicUtils/ParseUtils.hpp>
#include <SpatialDomains/Conditions.h>
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
namespace Nektar
{
......
......@@ -47,7 +47,7 @@
#define TIXML_USE_STL
#endif
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
#include <cstring>
#include <sstream>
......
......@@ -36,7 +36,7 @@
#include <SpatialDomains/MeshGraph1D.h>
#include <LibUtilities/BasicUtils/ParseUtils.hpp>
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
namespace Nektar
{
......
......@@ -37,7 +37,7 @@
#include <SpatialDomains/SegGeom.h>
#include <SpatialDomains/TriGeom.h>
#include <LibUtilities/BasicUtils/ParseUtils.hpp>
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
namespace Nektar
{
......
......@@ -37,7 +37,7 @@
#include <SpatialDomains/MeshGraph3D.h>
#include <SpatialDomains/TriGeom.h>
#include <LibUtilities/BasicUtils/ParseUtils.hpp>
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
namespace Nektar
{
......
......@@ -15,7 +15,7 @@
#define TIXML_USE_STL
#endif
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
#include <boost/shared_ptr.hpp>
#include <LibUtilities/BasicUtils/ErrorUtil.hpp>
......@@ -33,7 +33,7 @@
//
///////////////////////////////////////////////////////////////////////////////
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
#include <CardiacEPSolver/Stimuli/ProtocolS1.h>
namespace Nektar
......
......@@ -33,7 +33,7 @@
//
///////////////////////////////////////////////////////////////////////////////
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
#include <CardiacEPSolver/Stimuli/ProtocolS1S2.h>
namespace Nektar
......
......@@ -33,7 +33,7 @@
//
///////////////////////////////////////////////////////////////////////////////
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
#include <CardiacEPSolver/Stimuli/ProtocolSingle.h>
namespace Nektar
......
......@@ -33,7 +33,7 @@
//
///////////////////////////////////////////////////////////////////////////////
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
#include <LibUtilities/BasicUtils/VmathArray.hpp>
#include <CardiacEPSolver/Stimuli/Stimulus.h>
......
......@@ -33,7 +33,7 @@
//
///////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
#include <LibUtilities/BasicUtils/VmathArray.hpp>
#include <CardiacEPSolver/Stimuli/StimulusCircle.h>
......
......@@ -33,7 +33,7 @@
//
///////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
#include <LibUtilities/BasicUtils/VmathArray.hpp>
#include <CardiacEPSolver/Stimuli/StimulusPoint.h>
......
......@@ -33,7 +33,7 @@
//
///////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
#include <LibUtilities/BasicUtils/VmathArray.hpp>
#include <CardiacEPSolver/Stimuli/StimulusRect.h>
......
......@@ -43,7 +43,7 @@
#include <sstream>
#include <map>
#include <iomanip>
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
using namespace std;
using namespace Nektar;
......
......@@ -60,7 +60,7 @@
#include <LibUtilities/BasicConst/NektarUnivTypeDefs.hpp>
//#include <LibUtilities/Foundations/GaussPoints.h>
#include <boost/lexical_cast.hpp>
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
void OrderVertices(int nedges,SpatialDomains::MeshGraphSharedPtr graphShPt,
......
......@@ -37,7 +37,7 @@
#include <cstdlib>
#include <iomanip>
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
#include <SpatialDomains/MeshGraph.h>
#include <MultiRegions/ExpList.h>
#include <MultiRegions/ExpList2D.h>
......
......@@ -27,6 +27,7 @@ IF(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
ENDIF()
ADD_EXECUTABLE(Tester ${TESTER_SOURCES} ${ARGN})
MESSAGE(STATUS "Tinyxml: ${TINYXML_LIB}")
TARGET_LINK_LIBRARIES(Tester
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
......@@ -35,7 +36,7 @@ TARGET_LINK_LIBRARIES(Tester
${Boost_THREAD_LIBRARY}
optimized ${TINYXML_LIB} debug ${TINYXML_LIB}
)
ADD_DEPENDENCIES(Tester boost tinyxml)
ADD_DEPENDENCIES(Tester boost tinyxml-2.4.3)
IF( ${CMAKE_SYSTEM} MATCHES "Linux.*")
TARGET_LINK_LIBRARIES(Tester optimized rt debug rt)
......
......@@ -36,7 +36,7 @@
#ifndef NEKTAR_TESTS_METRIC_H
#define NEKTAR_TESTS_METRIC_H
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
#include <string>
#include <LibUtilities/BasicUtils/NekFactory.hpp>
......
......@@ -41,7 +41,7 @@
#include <string>
#include <vector>
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
namespace fs = boost::filesystem;
......
......@@ -2,7 +2,7 @@
#include <iostream>
#include <sstream>
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
#include <LibUtilities/BasicUtils/FileSystem.h>
......
......@@ -12,7 +12,7 @@
#include <LibUtilities/LinearAlgebra/Lapack.hpp>
#include <LibUtilities/BasicConst/NektarUnivTypeDefs.hpp>
#include <boost/lexical_cast.hpp>
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
using namespace Nektar;
......
......@@ -36,7 +36,7 @@
#ifndef UTILITIES_PREPROCESSING_FIELDCONVERT_OUTPUTFLD
#define UTILITIES_PREPROCESSING_FIELDCONVERT_OUTPUTFLD
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
#include "Module.h"
namespace Nektar
......
......@@ -36,7 +36,7 @@
#ifndef UTILITIES_PREPROCESSING_FIELDCONVERT_OUTPUTTECPLOT
#define UTILITIES_PREPROCESSING_FIELDCONVERT_OUTPUTTECPLOT
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
#include "Module.h"
namespace Nektar
......
......@@ -36,7 +36,7 @@
#ifndef UTILITIES_PREPROCESSING_FIELDCONVERT_OUTPUTVTK
#define UTILITIES_PREPROCESSING_FIELDCONVERT_OUTPUTVTK
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
#include "Module.h"
namespace Nektar
......
......@@ -11,7 +11,7 @@
#include <MultiRegions/ContField3D.h>
#include <MultiRegions/ContField3DHomogeneous1D.h>
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
#include <boost/math/special_functions/fpclassify.hpp>
......
......@@ -5,7 +5,7 @@
#include <vector>
#include <list>
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
using namespace std;
......
......@@ -42,7 +42,7 @@ using namespace std;
#include <boost/iostreams/filter/gzip.hpp>
namespace io = boost::iostreams;
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
#include "MeshElements.h"
#include "OutputNekpp.h"
......
......@@ -36,7 +36,7 @@
#ifndef UTILITIES_PREPROCESSING_MESHCONVERT_OUTPUTNEKPP
#define UTILITIES_PREPROCESSING_MESHCONVERT_OUTPUTNEKPP
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
#include "Module.h"
namespace Nektar
......
......@@ -36,7 +36,7 @@
#ifndef UTILITIES_PREPROCESSING_MESHCONVERT_OUTPUTVTK
#define UTILITIES_PREPROCESSING_MESHCONVERT_OUTPUTVTK
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
#include "Module.h"
namespace Nektar
......
......@@ -11,7 +11,7 @@
#define TIXML_USE_STL
#endif
#include <tinyxml/tinyxml.h>
#include <tinyxml.h>
void Header(FILE *, int nel);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment