--- a/src/parser/CMakeLists.txt
+++ b/src/parser/CMakeLists.txt
@@ -6,8 +6,8 @@
 #ADD_FLEX_BISON_DEPENDENCY(scanner parser)
 
 
-ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/parser.c
-                   COMMAND ${BISON_EXECUTABLE} -oparser.c ${CMAKE_CURRENT_SOURCE_DIR}/parser.y
+ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/parser.c ${CMAKE_CURRENT_BINARY_DIR}/parser.h
+                   COMMAND ${BISON_EXECUTABLE} -d -oparser.c ${CMAKE_CURRENT_SOURCE_DIR}/parser.y
 		   DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/parser.y )
 
 ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/scanner.c