Browse Source

Use given storm-dir for checking if dft is available

refactoring
Matthias Volk 8 years ago
parent
commit
3df8f71c0a
  1. 1
      CMakeLists.txt
  2. 5
      setup.py

1
CMakeLists.txt

@ -8,6 +8,7 @@ add_subdirectory(resources/pybind11)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/generated/config.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/generated/config.h)
message(STATUS "STORM-DIR: ${storm_DIR}")
set(STORMPY_LIB_DIR "${CMAKE_SOURCE_DIR}/lib/stormpy" CACHE STRING "Sets the storm library dir") set(STORMPY_LIB_DIR "${CMAKE_SOURCE_DIR}/lib/stormpy" CACHE STRING "Sets the storm library dir")

5
setup.py

@ -36,7 +36,10 @@ class CMakeBuild(build_ext):
os.makedirs(build_temp_version) os.makedirs(build_temp_version)
# Check cmake variable values # Check cmake variable values
output = subprocess.check_output(['cmake', os.path.abspath("cmake")], cwd=build_temp_version)
cmake_args = []
if self.storm_dir is not None:
cmake_args = ['-Dstorm_DIR=' + self.storm_dir]
output = subprocess.check_output(['cmake', os.path.abspath("cmake")] + cmake_args, cwd=build_temp_version)
output = output.decode('ascii') output = output.decode('ascii')
match = re.search(r"STORM-DIR: (.*)", output) match = re.search(r"STORM-DIR: (.*)", output)
assert(match) assert(match)

Loading…
Cancel
Save