smt2/smt2_input.h
smt2/sygus_input.cpp
smt2/sygus_input.h
- tptp/TptpLexer.c
- tptp/TptpParser.c
tptp/tptp.cpp
tptp/tptp.h
tptp/tptp_input.cpp
foreach(lang Smt2 Tptp)
string(TOLOWER ${lang} lang_dir)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${lang_dir})
+
+ set(gen_src_files
+ ${CMAKE_CURRENT_BINARY_DIR}/${lang_dir}/${lang}Lexer.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/${lang_dir}/${lang}Parser.cpp)
add_custom_command(
OUTPUT
- ${CMAKE_CURRENT_BINARY_DIR}/${lang_dir}/${lang}Lexer.c
+ ${gen_src_files}
${CMAKE_CURRENT_BINARY_DIR}/${lang_dir}/${lang}Lexer.h
- ${CMAKE_CURRENT_BINARY_DIR}/${lang_dir}/${lang}Parser.c
${CMAKE_CURRENT_BINARY_DIR}/${lang_dir}/${lang}Parser.h
${CMAKE_CURRENT_BINARY_DIR}/${lang_dir}/${lang}.tokens
COMMAND
${ANTLR3_COMMAND}
${CMAKE_CURRENT_SOURCE_DIR}/${lang_dir}/${lang}.g
-fo ${CMAKE_CURRENT_BINARY_DIR}/${lang_dir}
+ COMMAND
+ # We actually generate C++ files with ANTLR
+ ${CMAKE_COMMAND} -E rename
+ ${CMAKE_CURRENT_BINARY_DIR}/${lang_dir}/${lang}Lexer.c
+ ${CMAKE_CURRENT_BINARY_DIR}/${lang_dir}/${lang}Lexer.cpp
+ COMMAND
+ # We actually generate C++ files with ANTLR
+ ${CMAKE_COMMAND} -E rename
+ ${CMAKE_CURRENT_BINARY_DIR}/${lang_dir}/${lang}Parser.c
+ ${CMAKE_CURRENT_BINARY_DIR}/${lang_dir}/${lang}Parser.cpp
DEPENDS
${lang_dir}/${lang}.g
)
- set(gen_src_files
- ${CMAKE_CURRENT_BINARY_DIR}/${lang_dir}/${lang}Lexer.c
- ${CMAKE_CURRENT_BINARY_DIR}/${lang_dir}/${lang}Parser.c)
-
- # Tell cmake that generated source files are actually c++ files
- set_source_files_properties(${gen_src_files} PROPERTIES LANGUAGE CXX)
set_source_files_properties(${gen_src_files} PROPERTIES GENERATED TRUE)
# We don't want to enable -Wall for code generated by ANTLR.