From 6431d8d4101dfebd3b5dbe94add4b32022af5ffa Mon Sep 17 00:00:00 2001 From: sjunges Date: Fri, 11 Nov 2016 23:24:56 +0100 Subject: [PATCH] let xerces inclusion work on linux systems Former-commit-id: 3251cac0e0f04263aafd93f4760c96f695c044bf [formerly 7b7a8f5f405b15fdb0ea8b35f770d16b5454fc68] Former-commit-id: 13e8bc7a8d9d507c2f1ea4865aec98e84d6e240e --- CMakeLists.txt | 5 +++-- resources/3rdparty/include_xerces.cmake | 9 +++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 23d821e8a..190f72228 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ option(STORM_USE_COTIRE "Sets whether Cotire should be used (for building precom option(LINK_LIBCXXABI "Sets whether libc++abi should be linked." OFF) option(USE_LIBCXX "Sets whether the standard library is libc++." OFF) option(USE_CARL "Sets whether carl should be included." ON) -option(USE_XERCES "Sets whether xerces should be used." OFF) +option(XML_SUPPORT "Sets whether xml based format parsing should be included." ON) option(FORCE_COLOR "Force color output" OFF) mark_as_advanced(FORCE_COLOR) option(STORM_PYTHON "Builds the API for Python" OFF) @@ -45,7 +45,8 @@ set(CUDA_ROOT "" CACHE STRING "The hint to the root directory of CUDA (optional) set(MSAT_ROOT "" CACHE STRING "The hint to the root directory of MathSAT (optional).") set(ADDITIONAL_INCLUDE_DIRS "" CACHE STRING "Additional directories added to the include directories.") set(ADDITIONAL_LINK_DIRS "" CACHE STRING "Additional directories added to the link directories.") - +set(USE_XERCES ${XML_SUPPORT}) +mark_as_advanced(USE_XERCES) # Set some CMAKE Variables as advanced mark_as_advanced(CMAKE_OSX_ARCHITECTURES) diff --git a/resources/3rdparty/include_xerces.cmake b/resources/3rdparty/include_xerces.cmake index 73f559cec..a90d11379 100644 --- a/resources/3rdparty/include_xerces.cmake +++ b/resources/3rdparty/include_xerces.cmake @@ -19,8 +19,11 @@ if(USE_XERCES) set(XERCES_ROOT ${STORM_3RDPARTY_BINARY_DIR}/xercesc-3.1.2) set(XERCESC_INCLUDE ${XERCES_ROOT}/include) set(XERCES_LIBRARY_PATH ${XERCES_ROOT}/lib) - set(XERCESC_LIBRARIES ${XERCES_LIBRARY_PATH}/libxerces-c.a) - + if(BUILD_STATIC) + set(XERCESC_LIBRARIES ${XERCES_LIBRARY_PATH}/libxerces-c.a) + else() + set(XERCESC_LIBRARIES ${XERCES_LIBRARY_PATH}/libxerces-c${DYNAMIC_EXT}) + endif() add_dependencies(resources xercesc) endif() @@ -33,4 +36,6 @@ if(USE_XERCES) endif() find_package(CURL) list(APPEND STORM_LINK_LIBRARIES ${XERCESC_LIBRARIES} ${COREFOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY} ${CURL_LIBRARIES}) +else() + message (WARNING "StoRM - Building without Xerces disables parsing XML formats (for GSPNs)") endif(USE_XERCES)