fix: use taos_static for tmq_sim on windows

This commit is contained in:
kailixu 2023-08-14 16:31:58 +08:00
parent 1990a891c2
commit 8d0461e98c
4 changed files with 19 additions and 5 deletions

View File

@ -78,6 +78,12 @@ ELSE ()
SET(TD_TAOS_TOOLS TRUE)
ENDIF ()
IF (${TD_WINDOWS})
SET(TAOS_LIB taos_static)
ELSE ()
SET(TAOS_LIB taos)
ENDIF ()
IF (TD_WINDOWS)
MESSAGE("${Yellow} set compiler flag for Windows! ${ColourReset}")
SET(COMMON_FLAGS "/w /D_WIN32 /DWIN32 /Zi /MTd")

View File

@ -17,6 +17,9 @@ rem echo SIM_DIR: %SIM_DIR%
set "TSIM_DIR=%SIM_DIR%tsim\"
rem echo TSIM_DIR: %TSIM_DIR%
set "DATA_DIR=%TSIM_DIR%data\"
rem echo DATA_DIR: %DATA_DIR%
set "CFG_DIR=%TSIM_DIR%cfg\"
rem echo CFG_DIR: %CFG_DIR%
@ -30,25 +33,30 @@ if not exist %SIM_DIR% mkdir %SIM_DIR%
if not exist %TSIM_DIR% mkdir %TSIM_DIR%
if exist %CFG_DIR% rmdir /s/q %CFG_DIR%
if exist %LOG_DIR% rmdir /s/q %LOG_DIR%
if exist %DATA_DIR% rmdir /s/q %DATA_DIR%
if not exist %CFG_DIR% mkdir %CFG_DIR%
if not exist %LOG_DIR% mkdir %LOG_DIR%
if not exist %DATA_DIR% mkdir %DATA_DIR%
set "fqdn=localhost"
for /f "skip=1" %%A in (
'wmic computersystem get caption'
) do if not defined fqdn set "fqdn=%%A"
echo firstEp %fqdn% > %TAOS_CFG%
echo firstEp %fqdn%:7100 > %TAOS_CFG%
echo secondEp %fqdn%:7200 >> %TAOS_CFG%
echo fqdn %fqdn% >> %TAOS_CFG%
echo serverPort 7100 >> %TAOS_CFG%
echo dataDir %DATA_DIR% >> %TAOS_CFG%
echo logDir %LOG_DIR% >> %TAOS_CFG%
echo scriptDir %SCRIPT_DIR% >> %TAOS_CFG%
echo numOfLogLines 100000000 >> %TAOS_CFG%
echo rpcDebugFlag 143 >> %TAOS_CFG%
echo tmrDebugFlag 131 >> %TAOS_CFG%
echo cDebugFlag 135 >> %TAOS_CFG%
echo cDebugFlag 143 >> %TAOS_CFG%
echo qDebugFlag 143 >> %TAOS_CFG%
echo udebugFlag 135 >> %TAOS_CFG%
echo uDebugFlag 143 >> %TAOS_CFG%
echo debugFlag 143 >> %TAOS_CFG%
echo wal 0 >> %TAOS_CFG%
echo asyncLog 0 >> %TAOS_CFG%
echo locale en_US.UTF-8 >> %TAOS_CFG%

View File

@ -31,7 +31,7 @@ target_link_libraries(
)
target_link_libraries(
tmq_sim
PUBLIC taos
PUBLIC ${TAOS_LIB}
PUBLIC util
PUBLIC common
PUBLIC os

View File

@ -2,7 +2,7 @@ aux_source_directory(src TSIM_SRC)
add_executable(tsim ${TSIM_SRC})
target_link_libraries(
tsim
PUBLIC taos_static
PUBLIC ${TAOS_LIB}
PUBLIC util
PUBLIC common
PUBLIC os