mpw/debugger/CMakeLists.txt

23 lines
604 B
CMake
Raw Normal View History

2013-07-03 21:05:00 +00:00
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(DEBUGGER_SRC lexer.cpp parser.c)
add_custom_command(
OUTPUT lexer.cpp
COMMAND re2c -b -i -o lexer.cpp "${CMAKE_CURRENT_SOURCE_DIR}/lexer.re.cpp"
MAIN_DEPENDENCY lexer.re.cpp
DEPENDS commands.h parser.h
)
add_custom_command(
2013-07-03 23:55:09 +00:00
OUTPUT parser.c parser.h
COMMAND cp -f "${CMAKE_CURRENT_SOURCE_DIR}/parser.lemon" "parser.lemon"
2013-07-03 21:05:00 +00:00
COMMAND lemon parser.lemon
2013-07-03 23:55:09 +00:00
COMMAND cp -f parser.h "${CMAKE_CURRENT_SOURCE_DIR}/"
COMMAND cp -f parser.out "${CMAKE_CURRENT_SOURCE_DIR}/"
2013-07-03 21:05:00 +00:00
MAIN_DEPENDENCY parser.lemon
DEPENDS commands.h
)
add_library(DEBUGGER_LIB ${DEBUGGER_SRC})