summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-12-01 20:02:14 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-12-01 20:05:59 -0800
commit93ca61996ec714e95fa7c53f71719f1910e3bee3 (patch)
tree7fee3e5596d00505c2ffe56e78bb589714fbf1e6
parent0ba527775f8ea5371d7383d9118153fcb7a67bc3 (diff)
Changed build procedure so that an empty scanners.c is not created
if `re2c` is missing. Closes #231.
-rw-r--r--src/CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f71f09c..779428d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -47,11 +47,15 @@ if (MSVC)
file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} DOS_CURRENT_SOURCE_DIR)
add_custom_command( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/scanners.c
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scanners.re
- COMMAND ${RE2C} --case-insensitive -b -i ${DOS_CURRENT_SOURCE_DIR}\\scanners.re >${DOS_CURRENT_SOURCE_DIR}\\scanners.c)
+ COMMAND ${RE2C} --case-insensitive -b -i
+ -o ${DOS_CURRENT_SOURCE_DIR}\\scanners.c
+ ${DOS_CURRENT_SOURCE_DIR}\\scanners.re )
else(MSVC)
add_custom_command( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/scanners.c
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scanners.re
- COMMAND ${RE2C} --case-insensitive -b -i ${CMAKE_CURRENT_SOURCE_DIR}/scanners.re >${CMAKE_CURRENT_SOURCE_DIR}/scanners.c)
+ COMMAND ${RE2C} --case-insensitive -b -i
+ -o ${CMAKE_CURRENT_SOURCE_DIR}/scanners.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/scanners.re )
endif(MSVC)
include (GenerateExportHeader)