cmake: Antlr parser generation done.
authorMathias Preiner <mathias.preiner@gmail.com>
Fri, 10 Aug 2018 23:10:23 +0000 (16:10 -0700)
committerMathias Preiner <mathias.preiner@gmail.com>
Sat, 22 Sep 2018 23:30:59 +0000 (16:30 -0700)
CMakeLists.txt
cmake/FindANTLR.cmake
src/parser/cvc/CMakeLists.txt
src/parser/smt1/CMakeLists.txt
src/parser/smt2/CMakeLists.txt
src/parser/tptp/CMakeLists.txt

index 87b281fe1c807bf21ba6b5f1b6b2fa64278f8ad0..b93868feab4d298410cfc57bfe7cf290e5f6916f 100644 (file)
@@ -148,6 +148,7 @@ configure_file(
 add_subdirectory(src/base)
 add_subdirectory(src/expr)
 add_subdirectory(src/options)
+add_subdirectory(src/parser)
 add_subdirectory(src/theory)
 add_subdirectory(proofs/signatures)
 include_directories(src ${CMAKE_CURRENT_BINARY_DIR}/src)
index 5d572718679e9ab5c634e4270cafea3252c3a64f..e977ba88db973a18ad1a876bbc2ac5617f1616fb 100644 (file)
@@ -1,21 +1,26 @@
 # Find ANTLR
 # ANTLR_FOUND - system has ANTLR lib
+# ANTLR_BINARY - the ANTLR binary
 # ANTLR_INCLUDE_DIR - the ANTLR include directory
 # ANTLR_LIBRARIES - Libraries needed to use ANTLR
 
+find_program(ANTLR_BINARY
+  NAMES antlr3
+  PATHS "${PROJECT_SOURCE_DIR}/antlr-3.4/bin"
+  )
+
 find_path(ANTLR_INCLUDE_DIR
   NAMES antlr3.h
   PATHS "${PROJECT_SOURCE_DIR}/antlr-3.4/include"
-  NO_DEFAULT_PATH
   )
 
 find_library(ANTLR_LIBRARIES
   NAMES antlr3c libantlr3c
   PATHS "${PROJECT_SOURCE_DIR}/antlr-3.4/lib"
-  NO_DEFAULT_PATH
   )
 
 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(ANTLR DEFAULT_MSG ANTLR_INCLUDE_DIR ANTLR_LIBRARIES)
+find_package_handle_standard_args(
+  ANTLR DEFAULT_MSG ANTLR_BINARY ANTLR_INCLUDE_DIR ANTLR_LIBRARIES)
 
-mark_as_advanced(ANTLR_INCLUDE_DIR ANTLR_LIBRARIES)
+mark_as_advanced(ANTLR_BINARY ANTLR_INCLUDE_DIR ANTLR_LIBRARIES)
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..1f176cfb627186ae4f9abc170381395c902e0e02 100644 (file)
@@ -0,0 +1,9 @@
+add_custom_target(AntlrCvc
+  COMMAND
+    ${ANTLR_BINARY}
+      ${CMAKE_CURRENT_SOURCE_DIR}/Cvc.g
+      -fo ${CMAKE_CURRENT_BINARY_DIR}
+  DEPENDS
+    Cvc.g
+)
+#add_dependencies(... AntlrCvc)
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f219d85d923e6ed6e51bc3e3d055d37d6ea96ffa 100644 (file)
@@ -0,0 +1,9 @@
+add_custom_target(AntlrSmt1
+  COMMAND
+    ${ANTLR_BINARY}
+      ${CMAKE_CURRENT_SOURCE_DIR}/Smt1.g
+      -fo ${CMAKE_CURRENT_BINARY_DIR}
+  DEPENDS
+    Smt1.g
+)
+#add_dependencies(... AntlrSmt1)
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..d35f500bb81affab5ff3d779ba758c207ee31e83 100644 (file)
@@ -0,0 +1,9 @@
+add_custom_target(AntlrSmt2
+  COMMAND
+    ${ANTLR_BINARY}
+      ${CMAKE_CURRENT_SOURCE_DIR}/Smt2.g
+      -fo ${CMAKE_CURRENT_BINARY_DIR}
+  DEPENDS
+    Smt2.g
+)
+#add_dependencies(... AntlrSmt2)
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..bee38ce87f944f8a7d41281465e035a355f99541 100644 (file)
@@ -0,0 +1,9 @@
+add_custom_target(AntlrTptp
+  COMMAND
+    ${ANTLR_BINARY}
+      ${CMAKE_CURRENT_SOURCE_DIR}/Tptp.g
+      -fo ${CMAKE_CURRENT_BINARY_DIR}
+  DEPENDS
+    Tptp.g
+)
+#add_dependencies(... AntlrTptp)