diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index a8aa7d705869f34390ba465b18b641e43edbd8e4..c792e10c3af9376f70862c6d62fc07ec25f9ad88 100644
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -143,6 +143,10 @@ ADD_CUSTOM_COMMAND(
 )
 ADD_DEPENDENCIES(mysqld${MYSQLD_EXE_SUFFIX} gen_lex_hash)
 
+# Remove the auto-generated files as part of 'Clean Solution'
+SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES 
+                         "lex_hash.h;message.rc;message.h;sql_yacc.h;sql_yacc.cc")
+
 ADD_LIBRARY(udf_example MODULE udf_example.c udf_example.def)
 ADD_DEPENDENCIES(udf_example strings)
 TARGET_LINK_LIBRARIES(udf_example wsock32)