aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2015-06-25 20:18:10 +0200
committerPeter Wu <peter@lekensteyn.nl>2015-06-25 18:52:20 +0000
commitcb0ee6447b5c42144a8266e3dff30b42c6ab0bdf (patch)
tree773154a05a44971f2fc7989710d82bd929349eb1 /cmake/modules
parent8b6c4c352276873085f77afce89b33e314bb1fee (diff)
cmake/add_lemon_files: depend on lemon and lempar
Add a dependency on the lemon binary and lempar.c files because the output depends on these tools. This is already done for autotools and nmake. In addition, clean up the generated .h and .out files. Change-Id: Ic1fa2c23949abf05e976a67d226c90293b2ce834 Reviewed-on: https://code.wireshark.org/review/9139 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'cmake/modules')
-rw-r--r--cmake/modules/UseLemon.cmake14
1 files changed, 10 insertions, 4 deletions
diff --git a/cmake/modules/UseLemon.cmake b/cmake/modules/UseLemon.cmake
index 70a8f9b0ae..fbdf5188c5 100644
--- a/cmake/modules/UseLemon.cmake
+++ b/cmake/modules/UseLemon.cmake
@@ -5,17 +5,23 @@ MACRO(ADD_LEMON_FILES _sources )
GET_FILENAME_COMPONENT(_in ${_current_FILE} ABSOLUTE)
GET_FILENAME_COMPONENT(_basename ${_current_FILE} NAME_WE)
- SET(_out ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.c)
+ SET(_out ${CMAKE_CURRENT_BINARY_DIR}/${_basename})
ADD_CUSTOM_COMMAND(
OUTPUT
- ${_out}
+ ${_out}.c
+ # These files are generated as side-effect
+ ${_out}.h
+ ${_out}.out
COMMAND lemon
t=${_lemonpardir}/lempar.c
${_in}
- DEPENDS ${_in}
+ DEPENDS
+ ${_in}
+ lemon
+ ${_lemonpardir}/lempar.c
)
- SET(${_sources} ${${_sources}} ${_out} )
+ SET(${_sources} ${${_sources}} ${_out}.c )
ENDFOREACH (_current_FILE)
ENDMACRO(ADD_LEMON_FILES)