diff --git a/buildconfig/CMake/CommonSetup.cmake b/buildconfig/CMake/CommonSetup.cmake
index b1310f10e6c73ad05eea517693ad3ea69ffcd153..202453fe04642435becf3b0a22d689ed1ac3ebf8 100644
--- a/buildconfig/CMake/CommonSetup.cmake
+++ b/buildconfig/CMake/CommonSetup.cmake
@@ -259,7 +259,7 @@ endif ()
 # Configure clang-tidy if the tool is found
 ###########################################################################
 
-if ( CMAKE_VERSION GREATER "3.5" )
+if ( CMAKE_VERSION VERSION_GREATER "3.5" )
   set(ENABLE_CLANG_TIDY OFF CACHE BOOL "Add clang-tidy automatically to builds")
   if (ENABLE_CLANG_TIDY)
     find_program (CLANG_TIDY_EXE NAMES "clang-tidy" PATHS /usr/local/opt/llvm/bin )