You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
2.3 KiB

3 months ago
  1. set(STORM_HAVE_SPOT OFF)
  2. if(STORM_USE_SPOT_SYSTEM)
  3. # try to find Spot on the system
  4. if (NOT "${SPOT_ROOT}" STREQUAL "")
  5. message(STATUS "Storm - searching for Spot in ${SPOT_ROOT}")
  6. find_package(SPOT QUIET PATHS ${SPOT_ROOT} NO_DEFAULT_PATH)
  7. endif()
  8. if (NOT SPOT_FOUND)
  9. find_package(SPOT QUIET)
  10. endif()
  11. if (SPOT_FOUND)
  12. message(STATUS "Storm - Using system version of Spot ${SPOT_VERSION} (include: ${SPOT_INCLUDE_DIR}, library: ${SPOT_LIBRARIES}).")
  13. set(STORM_HAVE_SPOT ON)
  14. elseif(NOT STORM_USE_SPOT_SHIPPED)
  15. message (WARNING "Storm - Could not find Spot. Model checking of LTL formulas (beyond PCTL) will not be supported. You may want to set cmake option STORM_USE_SPOT_SHIPPED to install Spot automatically. If you already installed Spot, consider setting cmake option SPOT_ROOT. Unset STORM_USE_SPOT_SYSTEM to silence this warning.")
  16. endif()
  17. elseif()
  18. endif()
  19. set(STORM_SHIPPED_SPOT OFF)
  20. if(STORM_USE_SPOT_SHIPPED AND NOT STORM_HAVE_SPOT)
  21. # download and install shipped Spot
  22. ExternalProject_Add(spot
  23. URL http://www.lrde.epita.fr/dload/spot/spot-2.9.6.tar.gz # When updating, also change version output below
  24. DOWNLOAD_NO_PROGRESS TRUE
  25. DOWNLOAD_DIR ${STORM_3RDPARTY_BINARY_DIR}/spot_src
  26. SOURCE_DIR ${STORM_3RDPARTY_BINARY_DIR}/spot_src
  27. PREFIX ${STORM_3RDPARTY_BINARY_DIR}/spot
  28. CONFIGURE_COMMAND ${STORM_3RDPARTY_BINARY_DIR}/spot_src/configure --prefix=${STORM_3RDPARTY_BINARY_DIR}/spot --disable-python
  29. BUILD_COMMAND make -j${STORM_RESOURCES_BUILD_JOBCOUNT}
  30. INSTALL_COMMAND make install
  31. LOG_CONFIGURE ON
  32. LOG_BUILD ON
  33. LOG_INSTALL ON
  34. BUILD_BYPRODUCTS ${STORM_3RDPARTY_BINARY_DIR}/spot/lib/libspot${DYNAMIC_EXT}
  35. )
  36. add_dependencies(resources spot)
  37. set(SPOT_INCLUDE_DIR "${STORM_3RDPARTY_BINARY_DIR}/spot/include/")
  38. set(SPOT_DIR "${STORM_3RDPARTY_BINARY_DIR}/spot/")
  39. set(SPOT_LIBRARIES ${STORM_3RDPARTY_BINARY_DIR}/spot/lib/libspot${DYNAMIC_EXT})
  40. set(STORM_HAVE_SPOT ON)
  41. set(STORM_SHIPPED_SPOT ON)
  42. message(STATUS "Storm - Using shipped version of Spot 2.9.6 (include: ${SPOT_INCLUDE_DIR}, library ${SPOT_LIBRARIES}).")
  43. endif()
  44. if (STORM_HAVE_SPOT)
  45. include_directories("${SPOT_INCLUDE_DIR}")
  46. list(APPEND STORM_LINK_LIBRARIES ${SPOT_LIBRARIES})
  47. endif()