From a04085e8482fdeb3bebeab8e24cd2ad1fddc110e Mon Sep 17 00:00:00 2001 From: Tim Quatmann Date: Fri, 4 Sep 2020 11:50:10 +0200 Subject: [PATCH] Added cmake option exclude_tests_from_all so that we can run make install without building the tests. --- CMakeLists.txt | 3 +++ src/CMakeLists.txt | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) 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)