From fc1dd999b27c9a524a0f36d35b456b9ccd255ff7 Mon Sep 17 00:00:00 2001 From: sjunges Date: Tue, 16 Feb 2016 18:56:29 +0100 Subject: [PATCH] only build xercesc if xml input format support is required Former-commit-id: ce58e72eed071d29f17ea9c421a8ec8fa2ec5bc4 --- CMakeLists.txt | 1 + resources/3rdparty/CMakeLists.txt | 28 +++++++++++++++------------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index abac7db36..a0e325669 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,6 +34,7 @@ set(MSAT_ROOT "" CACHE STRING "The root directory of MathSAT (if available).") 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(CUSTOM_BOOST_ROOT "" CACHE STRING "A custom path to the Boost root directory.") +set(STORM_SUPPORT_XML_INPUT_FORMATS 0) # If the DEBUG option was turned on, we will target a debug version and a release version otherwise. if (STORM_DEBUG) diff --git a/resources/3rdparty/CMakeLists.txt b/resources/3rdparty/CMakeLists.txt index 32fa4c5a5..2e3d96146 100644 --- a/resources/3rdparty/CMakeLists.txt +++ b/resources/3rdparty/CMakeLists.txt @@ -1,19 +1,21 @@ add_custom_target(resources) add_custom_target(test-resources) -include(ExternalProject) -ExternalProject_Add( - xercesc - SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/xercesc-3.1.2 - CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/xercesc-3.1.2/configure --prefix=${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2 --libdir=${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2/lib CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-O3 CXXFLAGS=-O3 - PREFIX ${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2 - BUILD_COMMAND make - BUILD_IN_SOURCE 0 - LOG_CONFIGURE ON - LOG_BUILD ON - LOG_INSTALL ON -) -add_dependencies(resources xercesc) +if(STORM_SUPPORT_XML_FORMATS) + include(ExternalProject) + ExternalProject_Add( + xercesc + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/xercesc-3.1.2 + CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/xercesc-3.1.2/configure --prefix=${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2 --libdir=${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2/lib CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-O3 CXXFLAGS=-O3 + PREFIX ${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2 + BUILD_COMMAND make + BUILD_IN_SOURCE 0 + LOG_CONFIGURE ON + LOG_BUILD ON + LOG_INSTALL ON + ) + add_dependencies(resources xercesc) +endif() ExternalProject_Add( glpk