From 74f7cd17eadf8ea6d6109a4ff275ae48ff2c1771 Mon Sep 17 00:00:00 2001 From: Tim Quatmann Date: Wed, 20 May 2020 15:17:43 +0200 Subject: [PATCH] Changed the target directory for the downloaded Eigen headers so that they are now located within the build folder (hopefully avoiding conflicts with multiple build-folders). Made the include path for the Eigen headers more unique, so we no longer use the headers at /urs/include/ instead. --- CHANGELOG.md | 1 + resources/3rdparty/CMakeLists.txt | 13 ++++++++----- src/storm/utility/eigen.h | 7 ++++--- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a1d684e3..8a20071d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Version 1.5.x - Scheduler export: Properly handle models with end components. Added export in .json format. - CMake: Search for Gurobi prefers new versions - CMake: We no longer ship xerces-c. If xerces-c is not found on the system, storm-gspn will not be able to parse xml-based GSPN formats +- `Eigen' library: The source code of Eigen is no longer included but downloaded from an external repository instead. Incremented Eigen version to 3.3.7 which fixes a compilation issue with recent XCode Versions. - Tests: Enabled tests for permissive schedulers - `storm-counterexamples`: fix when computing multiple counterexamples in debug mode - `storm-dft`: Renamed setting `--show-dft-stats` to `dft-statistics` and added approximation information to statistics. diff --git a/resources/3rdparty/CMakeLists.txt b/resources/3rdparty/CMakeLists.txt index ecc01212e..3833ca950 100644 --- a/resources/3rdparty/CMakeLists.txt +++ b/resources/3rdparty/CMakeLists.txt @@ -3,6 +3,7 @@ add_custom_target(test-resources) set(STORM_3RDPARTY_SOURCE_DIR ${PROJECT_SOURCE_DIR}/resources/3rdparty) set(STORM_3RDPARTY_BINARY_DIR ${PROJECT_BINARY_DIR}/resources/3rdparty) +set(STORM_3RDPARTY_INCLUDE_DIR ${PROJECT_BINARY_DIR}/include/resources/3rdparty) ############################################################# @@ -45,12 +46,14 @@ list(APPEND STORM_DEP_TARGETS gmm) ############################################################# # Checkout Eigen version 3.3.7 +message (STATUS "Storm - Including Eigen 3.3.7.") ExternalProject_Add( eigen_src GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git GIT_SHALLOW 1 GIT_TAG 21ae2afd4edaa1b69782c67a54182d34efe43f9c - SOURCE_DIR ${STORM_3RDPARTY_SOURCE_DIR}/eigen + SOURCE_DIR ${STORM_3RDPARTY_INCLUDE_DIR}/StormEigen + PREFIX ${STORM_3RDPARTY_BINARY_DIR}/StormEigen-3.3.7 PATCH_COMMAND git apply ${STORM_3RDPARTY_SOURCE_DIR}/patches/eigen.patch UPDATE_COMMAND "" CONFIGURE_COMMAND "" @@ -58,9 +61,9 @@ ExternalProject_Add( INSTALL_COMMAND "" LOG_INSTALL ON ) -add_imported_library_interface(Eigen "${STORM_3RDPARTY_SOURCE_DIR}/eigen") -list(APPEND STORM_DEP_TARGETS Eigen) -add_dependencies(Eigen eigen_src) +add_imported_library_interface(StormEigen "${STORM_3RDPARTY_INCLUDE_DIR}/StormEigen") +list(APPEND STORM_DEP_TARGETS StormEigen) +add_dependencies(StormEigen eigen_src) @@ -121,7 +124,7 @@ set(SPARSEPP_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/resources/3rdparty/sparsepp/spar file(GLOB SPARSEPP_HEADERS "${SPARSEPP_INCLUDE_DIR}/*.h") # Add the sparsepp headers to the headers that are copied to the include directory in the build directory. -set(SPARSEPP_BINDIR_DIR ${CMAKE_BINARY_DIR}/include/resources/3rdparty/sparsepp) +set(SPARSEPP_BINDIR_DIR ${STORM_3RDPARTY_INCLUDE_DIR}/sparsepp) include_directories("${SPARSEPP_BINDIR_DIR}") foreach(HEADER ${SPARSEPP_HEADERS}) string(REGEX REPLACE "${PROJECT_SOURCE_DIR}/src/?" "" RELATIVE_HEADER_PATH ${HEADER}) diff --git a/src/storm/utility/eigen.h b/src/storm/utility/eigen.h index 959a8a658..b633683f4 100644 --- a/src/storm/utility/eigen.h +++ b/src/storm/utility/eigen.h @@ -14,9 +14,10 @@ #endif // Finally include the parts of Eigen we need. -#include -#include -#include +// Make sure to include our patched version of Eigen (and not a pre-installed one e.g. located at /usr/include) +#include +#include +#include #if defined(__clang__) #pragma clang diagnostic pop