From 7900b3bbfc6039ba24cdf1352f7cd61d83076d91 Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Wed, 31 Jul 2013 13:58:06 +0200 Subject: [PATCH] Disable testing if BUILD_TESTING is switched off This is an "official" switch for disable testing; our own code which adds tests should adhere to it. (It is added by CTest) --- cmake/Modules/OpmLibMain.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/Modules/OpmLibMain.cmake b/cmake/Modules/OpmLibMain.cmake index 09816a091..755064618 100644 --- a/cmake/Modules/OpmLibMain.cmake +++ b/cmake/Modules/OpmLibMain.cmake @@ -196,8 +196,10 @@ if (COMMAND tests_hook) endif (COMMAND tests_hook) # make datafiles necessary for tests available in output directory -opm_data (tests datafiles "${tests_DIR}") -opm_compile_satellites (${project} tests "" "${tests_REGEXP}") +if (BUILD_TESTING) + opm_data (tests datafiles "${tests_DIR}") + opm_compile_satellites (${project} tests "" "${tests_REGEXP}") +endif (BUILD_TESTING) # use this target to run all tests add_custom_target (check