From 0cb3f0cee85252276cdcdef319fb963dc445d55a Mon Sep 17 00:00:00 2001 From: Tim Quatmann Date: Wed, 3 Jun 2020 11:33:15 +0200 Subject: [PATCH] Adaptions due to recently introduced storm-version-info library --- CMakeLists.txt | 8 ++++---- src/mod_info.cpp | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e0e78b..b4743d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,11 +21,11 @@ function(stormpy_module NAME) if(ARGC GREATER 1) # Additional libraries - target_include_directories(${NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${storm_INCLUDE_DIR} ${storm-parsers_INCLUDE_DIR} ${storm-counterexamples_INCLUDE_DIR} ${ARGV2} ${CMAKE_CURRENT_BINARY_DIR}/src/generated) - target_link_libraries(${NAME} PRIVATE storm storm-parsers storm-counterexamples ${ARGV1}) + target_include_directories(${NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${storm_INCLUDE_DIR} ${storm-parsers_INCLUDE_DIR} ${storm-counterexamples_INCLUDE_DIR} ${storm-version-info_INCLUDE_DIR} ${ARGV2} ${CMAKE_CURRENT_BINARY_DIR}/src/generated) + target_link_libraries(${NAME} PRIVATE storm storm-parsers storm-counterexamples storm-version-info ${ARGV1}) else() - target_include_directories(${NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${storm_INCLUDE_DIR} ${storm-parsers_INCLUDE_DIR} ${storm-counterexamples_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/src/generated) - target_link_libraries(${NAME} PRIVATE storm storm-parsers storm-counterexamples) + target_include_directories(${NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${storm_INCLUDE_DIR} ${storm-parsers_INCLUDE_DIR} ${storm-counterexamples_INCLUDE_DIR} ${storm-version-info_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/src/generated) + target_link_libraries(${NAME} PRIVATE storm storm-parsers storm-counterexamples storm-version-info ) endif() endfunction(stormpy_module) diff --git a/src/mod_info.cpp b/src/mod_info.cpp index f342d2b..4ea600e 100644 --- a/src/mod_info.cpp +++ b/src/mod_info.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "storm/utility/storm-version.h" +#include "storm-version-info/storm-version.h" PYBIND11_MODULE(info, m) { m.doc() = "Storm information"; @@ -9,15 +9,15 @@ PYBIND11_MODULE(info, m) { options.disable_function_signatures(); #endif - py::class_(m, "Version", "Version information for Storm") + py::class_(m, "Version", "Version information for Storm") // static properties are still called with self as argument (which we ignore), see // https://pybind11.readthedocs.io/en/master/advanced/classes.html#static-properties - .def_property_readonly_static("major", [](py::object /* self */){ return storm::utility::StormVersion::versionMajor; }, "Storm major version.") - .def_property_readonly_static("minor", [](py::object /* self */){ return storm::utility::StormVersion::versionMinor; }, "Storm minor version.") - .def_property_readonly_static("patch", [](py::object /* self */){ return storm::utility::StormVersion::versionPatch; }, "Storm patch version.") - .def_property_readonly_static("development", [](py::object /* self */){ return storm::utility::StormVersion::versionDev; }, "Flag if Storm is development version.") - .def_property_readonly_static("short", [](py::object /* self */){ return storm::utility::StormVersion::shortVersionString(); }, "Storm version in short representation.") - .def_property_readonly_static("long", [](py::object /* self */){ return storm::utility::StormVersion::longVersionString(); }, "Storm version in long representation.") - .def_property_readonly_static("build_info", [](py::object /* self */){ return storm::utility::StormVersion::buildInfo(); }, "Build info for Storm.") + .def_property_readonly_static("major", [](py::object /* self */){ return storm::StormVersion::versionMajor; }, "Storm major version.") + .def_property_readonly_static("minor", [](py::object /* self */){ return storm::StormVersion::versionMinor; }, "Storm minor version.") + .def_property_readonly_static("patch", [](py::object /* self */){ return storm::StormVersion::versionPatch; }, "Storm patch version.") + .def_property_readonly_static("development", [](py::object /* self */){ return storm::StormVersion::versionDev; }, "Flag if Storm is development version.") + .def_property_readonly_static("short", [](py::object /* self */){ return storm::StormVersion::shortVersionString(); }, "Storm version in short representation.") + .def_property_readonly_static("long", [](py::object /* self */){ return storm::StormVersion::longVersionString(); }, "Storm version in long representation.") + .def_property_readonly_static("build_info", [](py::object /* self */){ return storm::StormVersion::buildInfo(); }, "Build info for Storm.") ; }