diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b9fd698..bcaebfe 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -31,7 +31,9 @@
 #############################################
 
 add_subdirectory (rttr)
+if(UNIT_TESTS)
 add_subdirectory (unit_tests)
+endif()
 
 if (${BUILD_BENCHMARKS})
     add_subdirectory (benchmarks)
