diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6d07b943fc71e4bd519aa8f15cc7ce028664fce6..b9d6f19c4223f5b209b4312998f9a97a6b824c79 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,11 +1,8 @@
 cmake_minimum_required(VERSION 3.1)
 project (dap_udp_server C)
 
-if(NOT ${SUBMODULES_NO_BUILD} MATCHES ON)
+if(NOT (${SUBMODULES_NO_BUILD} MATCHES ON))
     add_subdirectory(libdap-server-core)
-endif()
-
-if(BUILD_DAP_UDP_SERVER_TESTS)
     enable_testing()
     add_subdirectory(test)
 endif()