diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d882f18c..edf9fa3e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,6 +61,9 @@ export_option(STORM_USE_CLN_RF) option(BUILD_SHARED_LIBS "Build the Storm library dynamically" OFF) option(STORM_DEBUG_CUDD "Build CUDD in debug mode." OFF) MARK_AS_ADVANCED(STORM_DEBUG_CUDD) +option(STORM_EXCLUDE_TESTS_FROM_ALL "If set, tests will not be compiled by default" OFF ) +export_option(STORM_EXCLUDE_TESTS_FROM_ALL) +MARK_AS_ADVANCED(STORM_EXCLUDE_TESTS_FROM_ALL) set(BOOST_ROOT "" CACHE STRING "A hint to the root directory of Boost (optional).") set(GUROBI_ROOT "" CACHE STRING "A hint to the root directory of Gurobi (optional).") set(Z3_ROOT "" CACHE STRING "A hint to the root directory of Z3 (optional).") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 24a213e76..2f0e8ac34 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -23,7 +23,10 @@ add_subdirectory(storm-pomdp-cli) add_subdirectory(storm-conv) add_subdirectory(storm-conv-cli) - -add_subdirectory(test) +if (STORM_EXCLUDE_TESTS_FROM_ALL) + add_subdirectory(test EXCLUDE_FROM_ALL) +else() + add_subdirectory(test) +endif() set(STORM_TARGETS ${STORM_TARGETS} PARENT_SCOPE)