From 417f9bc2bec90e61d2808cd811688fa6b2b426a5 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Mon, 19 Dec 2016 23:19:09 +0100 Subject: [PATCH] disable signature doc --- CMakeLists.txt | 6 +++++- doc/source/code_stormpy_core.rst | 3 +-- src/common.h | 2 ++ src/mod_core.cpp | 7 +++++++ src/mod_expressions.cpp | 5 +++++ src/mod_logic.cpp | 6 ++++++ src/mod_storage.cpp | 6 ++++++ 7 files changed, 32 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4957272..398e2b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,9 +2,13 @@ cmake_minimum_required(VERSION 3.0.0) project(pystorm) +option(STORMPY_DISABLE_SIGNATURE_DOC "disables the signature in the documentation" ON) + find_package(storm REQUIRED) add_subdirectory(resources/pybind11) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/generated/config.h) + set(STORMPY_LIB_DIR "${CMAKE_SOURCE_DIR}/lib/stormpy") @@ -19,7 +23,7 @@ function(stormpy_module NAME) file(GLOB_RECURSE "STORM_${NAME}_SOURCES" "${CMAKE_CURRENT_SOURCE_DIR}/src/${NAME}/*.cpp") pybind11_add_module(${NAME} "${CMAKE_CURRENT_SOURCE_DIR}/src/mod_${NAME}.cpp" ${STORM_${NAME}_SOURCES}) - target_include_directories(${NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${storm_INCLUDE_DIR}) + target_include_directories(${NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${storm_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/src/generated) target_link_libraries(${NAME} PRIVATE storm) endfunction(stormpy_module) diff --git a/doc/source/code_stormpy_core.rst b/doc/source/code_stormpy_core.rst index fd4b621..4dfd7af 100644 --- a/doc/source/code_stormpy_core.rst +++ b/doc/source/code_stormpy_core.rst @@ -4,10 +4,9 @@ Stormpy.core .. automodule:: stormpy -useful #1 -- auto members +Core members ========================= -This is something I want to say that is not in the docstring. .. automodule:: stormpy.core :members: \ No newline at end of file diff --git a/src/common.h b/src/common.h index 6be9148..b7da720 100644 --- a/src/common.h +++ b/src/common.h @@ -7,6 +7,8 @@ #pragma once +#include "config.h" + #include #include #include diff --git a/src/mod_core.cpp b/src/mod_core.cpp index b008e40..b7792f4 100644 --- a/src/mod_core.cpp +++ b/src/mod_core.cpp @@ -7,6 +7,13 @@ PYBIND11_PLUGIN(core) { py::module m("core"); + +#ifdef STORMPY_DISABLE_SIGNATURE_DOC + py::options options; + options.disable_function_signatures(); +#endif + + define_core(m); define_parse(m); define_build(m); diff --git a/src/mod_expressions.cpp b/src/mod_expressions.cpp index ef89106..b876034 100644 --- a/src/mod_expressions.cpp +++ b/src/mod_expressions.cpp @@ -4,6 +4,11 @@ PYBIND11_PLUGIN(expressions) { py::module m("expressions", "Storm expressions"); + +#ifdef STORMPY_DISABLE_SIGNATURE_DOC + py::options options; + options.disable_function_signatures(); +#endif py::class_>(m, "ExpressionManager", "Manages variables for expressions") ; diff --git a/src/mod_logic.cpp b/src/mod_logic.cpp index 98fcad1..881560b 100644 --- a/src/mod_logic.cpp +++ b/src/mod_logic.cpp @@ -4,6 +4,12 @@ PYBIND11_PLUGIN(logic) { py::module m("logic", "Logic module for Storm"); + +#ifdef STORMPY_DISABLE_SIGNATURE_DOC + py::options options; + options.disable_function_signatures(); +#endif + define_formulae(m); return m.ptr(); } diff --git a/src/mod_storage.cpp b/src/mod_storage.cpp index 221cbbe..e91907c 100644 --- a/src/mod_storage.cpp +++ b/src/mod_storage.cpp @@ -6,6 +6,12 @@ PYBIND11_PLUGIN(storage) { py::module m("storage"); + +#ifdef STORMPY_DISABLE_SIGNATURE_DOC + py::options options; + options.disable_function_signatures(); +#endif + define_bitvector(m); define_model(m); define_sparse_matrix(m);