--- CMakeLists.txt.orig	2019-05-30 02:33:58 UTC
+++ CMakeLists.txt
@@ -402,11 +402,15 @@ configure_file(
   ${CMAKE_CURRENT_BINARY_DIR}/src/btorconfig.h)
 
 # Enable CTest
+if (BUILD_TESTING)
 enable_testing()
+endif(BUILD_TESTING)
 
 include_directories(src ${CMAKE_CURRENT_BINARY_DIR}/src)
 add_subdirectory(src)
+if (BUILD_TESTING)
 add_subdirectory(test)
+endif(BUILD_TESTING)
 if(PYTHON)
   add_subdirectory(src/api/python)
 endif()
