mirror of
https://github.com/taosdata/TDengine
synced 2026-05-24 10:09:01 +00:00
The following commits could not be applied individually due to context differences between the monorepo and the public repo's build files. They have been applied as a cumulative diff to ensure the final state matches the monorepo exactly: - chore: sync CI files with 3.0 branch to eliminate merge conflicts (rd-public/tsdb!271) - revert(refactor): dynamically link taosd taosudf taosmqtt against libtaosnative.so to reduce binary size (revert #183) (rd-public/tsdb!282) - fix(docs): autofix formatting issues across all doc files (rd-public/tsdb!296) - feat: support -DBUILD_SANITIZER=true on windows for debug build (rd-public/tsdb!291) - feat(build): build cache, mirror, and sccache optimizations (rd-public/tsdb!326) - docs: update image for three replica (rd-public/tsdb!324) - enh: shared storage on windows (rd-public/tsdb!333) - fix(cmake): convert ext_libs3 from git clone to URL tarball download (rd-public/tsdb!360) - feat: dual-source deps and comprehensive docs/packaging (cherry-pick to main) (rd-public/tsdb!352) - fix(cmake): guard DOWNLOAD_EXTRACT_TIMESTAMP for CMake < 3.24 and fix duplicate Cargo.lock entry (rd-public/tsdb!369) - fix: test case execution failure in pytest.sh (rd-public/tsdb!338) - enh: built-in compilation support for Python UDF plugins use abi3 (rd-public/tsdb!325)
63 lines
1.9 KiB
CMake
63 lines
1.9 KiB
CMake
aux_source_directory(src PARSER_SRC)
|
|
set(PARSER_SRC
|
|
src/parAstCreater.c
|
|
src/parAstParser.c
|
|
src/parAuthenticator.c
|
|
src/parCalcConst.c
|
|
src/parInsertSml.c
|
|
src/parInsertSql.c
|
|
src/parInsertStmt.c
|
|
src/parInsertUtil.c
|
|
src/parser.c
|
|
src/parTokenizer.c
|
|
src/parTranslater.c
|
|
src/parUtil.c
|
|
src/taos_lemon_sql.tab.c
|
|
)
|
|
|
|
IF(TD_ENTERPRISE)
|
|
LIST(APPEND PARSER_SRC ${TD_ENTERPRISE_DIR}/source/plugins/view/src/parserView.c)
|
|
ENDIF()
|
|
|
|
message(STATUS "Debugging ............................")
|
|
message(STATUS "CMAKE_CURRENT_BINARY_DIR:${CMAKE_CURRENT_BINARY_DIR}")
|
|
|
|
set(_depends
|
|
${CMAKE_CURRENT_BINARY_DIR}/taos_lemon_sql.c
|
|
${CMAKE_CURRENT_BINARY_DIR}/taos_lemon_token.h
|
|
)
|
|
add_custom_command(
|
|
OUTPUT ${_depends}
|
|
COMMAND $<TARGET_FILE:lemon>
|
|
-T$<TARGET_PROPERTY:lemon,SOURCE_DIR>/lempar.c
|
|
-d${CMAKE_CURRENT_BINARY_DIR}
|
|
${CMAKE_CURRENT_SOURCE_DIR}/inc/sql.y
|
|
COMMAND "${CMAKE_COMMAND}" -E rename ${CMAKE_CURRENT_BINARY_DIR}/sql.c ${CMAKE_CURRENT_BINARY_DIR}/taos_lemon_sql.c
|
|
COMMAND "${CMAKE_COMMAND}" -E rename ${CMAKE_CURRENT_BINARY_DIR}/sql.h ${CMAKE_CURRENT_BINARY_DIR}/taos_lemon_token.h
|
|
COMMAND "${CMAKE_COMMAND}" -E echo "generated files are in ${CMAKE_CURRENT_BINARY_DIR}/{taos_lemon_sql.c,taos_lemon_token.h}"
|
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/inc/sql.y
|
|
lemon
|
|
$<TARGET_PROPERTY:lemon,SOURCE_DIR>/lempar.c
|
|
COMMENT "Generating sql.c using lemon"
|
|
)
|
|
|
|
add_custom_target(lemon_sql
|
|
DEPENDS ${_depends}
|
|
)
|
|
|
|
add_library(parser STATIC ${PARSER_SRC})
|
|
add_dependencies(parser lemon_sql)
|
|
target_include_directories(
|
|
parser
|
|
PUBLIC "${TD_SOURCE_DIR}/include/libs/parser"
|
|
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
|
|
)
|
|
|
|
target_link_libraries(
|
|
parser
|
|
PRIVATE os util nodes catalog function scalar planner geometry transport qcom decimal
|
|
)
|
|
|
|
if(BUILD_TEST)
|
|
ADD_SUBDIRECTORY(test)
|
|
endif()
|