From 2a394d0cb8308afa64b75b70fd32dd5330a92764 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 20 Mar 2016 14:34:44 -0500 Subject: [PATCH] Do not copy lemon grammars to the output directory - Having my edits to the grammar disappear because Visual Studio had opened the copy instead of the original was super annoying. Using the -C option with Lemon, this problem is avoided because there are no copies to worry about. --- src/CMakeLists.txt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 797e76139..87447270b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -708,15 +708,11 @@ else() endif() add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/xlat_parser.c ${CMAKE_CURRENT_BINARY_DIR}/xlat_parser.h - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/xlat/xlat_parser.y . - COMMAND lemon xlat_parser.y - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND lemon -C${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/xlat/xlat_parser.y DEPENDS lemon ${CMAKE_CURRENT_SOURCE_DIR}/xlat/xlat_parser.y ) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zcc-parse.c ${CMAKE_CURRENT_BINARY_DIR}/zcc-parse.h - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/zscript/zcc-parse.lemon . - COMMAND lemon zcc-parse.lemon - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND lemon -C${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/zscript/zcc-parse.lemon DEPENDS lemon ${CMAKE_CURRENT_SOURCE_DIR}/zscript/zcc-parse.lemon ) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sc_man_scanner.h