tests CHANGE make tests enabled only in Debug build mode

tests requires additional dependency (cmocka) so disable them
in the Release build mode to simplify building package in this case.
Debug build mode has tests enabled so it requires cmocka to be installed.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6ec2dad..20a94c9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,8 +33,13 @@
 set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
 set(CMAKE_C_FLAGS_DEBUG   "-g -O0")
 
-option(ENABLE_BUILD_TESTS "Build tests" ON)
-option(ENABLE_VALGRIND_TESTS "Build tests with valgrind" ON)
+if(CMAKE_BUILD_TYPE STREQUAL debug)
+	option(ENABLE_BUILD_TESTS "Build tests" ON)
+	option(ENABLE_VALGRIND_TESTS "Build tests with valgrind" ON)
+else()
+	option(ENABLE_BUILD_TESTS "Build tests" OFF)
+	option(ENABLE_VALGRIND_TESTS "Build tests with valgrind" OFF)
+endif()
 
 set(libsrc
 	src/common.c