Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use taos_static for tmq_sim on windows #22430

Merged
merged 1 commit into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 6 additions & 0 deletions cmake/cmake.define
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
14 changes: 11 additions & 3 deletions tests/script/wtest.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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%

Expand All @@ -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%
Expand Down
2 changes: 1 addition & 1 deletion utils/test/c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ target_link_libraries(
)
target_link_libraries(
tmq_sim
PUBLIC taos
PUBLIC ${TAOS_LIB}
PUBLIC util
PUBLIC common
PUBLIC os
Expand Down
2 changes: 1 addition & 1 deletion utils/tsim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down