Skip to content
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
[submodule "extern/log"]
path = extern/log
url = ../../lsst/log
[submodule "extern/hyrise-sql-parser"]
path = extern/hyrise-sql-parser
url = https://github.com/lsst/hyrise-sql-parser
branch = qserv-compat
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@ project(Qserv

enable_testing()

option(QSERV_USE_HYRISE_SQL_PARSER
"Use the Hyrise SQL parser to build query IR for SELECT statements, instead of the ANTLR-based parser"
ON
)

include(GNUInstallDirs)
set(CMAKE_INSTALL_PREFIX ${PROJECT_BINARY_DIR}/install)

add_subdirectory(bin)
add_subdirectory(doc)
add_subdirectory(etc)
add_subdirectory(extern/hyrise-sql-parser)
add_subdirectory(extern/log)
add_subdirectory(extern/sphgeom)
Comment thread
malensek marked this conversation as resolved.
add_subdirectory(python)
Expand Down
4 changes: 2 additions & 2 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ add_custom_target(docs-linkcheck
COMMENT "Checking documentation links with Sphinx"
COMMAND ${SPHINX_EXECUTABLE}
-b linkcheck
-d ${CMAKE_CURRENT_BINARY_DIR}/doctrees
-d ${CMAKE_CURRENT_BINARY_DIR}/doctrees-linkcheck
-n -W
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/linkcheck
BYPRODUCTS
${CMAKE_CURRENT_BINARY_DIR}/doctrees
${CMAKE_CURRENT_BINARY_DIR}/doctrees-linkcheck
${CMAKE_CURRENT_BINARY_DIR}/linkcheck
)
1 change: 1 addition & 0 deletions extern/hyrise-sql-parser
Submodule hyrise-sql-parser added at 17e8d1
22 changes: 21 additions & 1 deletion src/ccontrol/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ target_include_directories(ccontrol PRIVATE
)

target_sources(ccontrol PRIVATE
HyriseAdapter.cc
MergingHandler.cc
ParseAdapters.cc
ParseListener.cc
Comment thread
malensek marked this conversation as resolved.
Expand All @@ -27,11 +28,16 @@ target_link_libraries(ccontrol PUBLIC
cconfig
css
global
hyrise_sql_parser::sqlparser
log
parser
sphgeom
)
Comment thread
malensek marked this conversation as resolved.

if(QSERV_USE_HYRISE_SQL_PARSER)
target_compile_definitions(ccontrol PUBLIC QSERV_USE_HYRISE_SQL_PARSER)
endif()

install(TARGETS ccontrol)

FUNCTION(ccontrol_tests)
Expand All @@ -58,7 +64,21 @@ FUNCTION(ccontrol_tests)
ENDFUNCTION()

ccontrol_tests(
testAntlr4GeneratedIR
testCControl
testParserCorpus
testUserQueryType
)

target_compile_definitions(testParserCorpus PRIVATE
QSERV_PARSER_CORPUS_DIR="${CMAKE_CURRENT_SOURCE_DIR}/testdata/parser-corpus"
)

if(QSERV_USE_HYRISE_SQL_PARSER)
ccontrol_tests(
testHyriseGeneratedIR
)
else()
ccontrol_tests(
testAntlr4GeneratedIR
)
endif()
Loading
Loading