diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d54d600e1b6c90422abfed00acae7656d6e255d..f8c1eab99b2b8a6c0d97c29cf39ce2740a4c78e3 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,6 +87,7 @@ IF (NOT DEFINED TD_CLUSTER) SET(TD_MIPS_32 FALSE) SET(TD_DARWIN_64 FALSE) SET(TD_WINDOWS_64 FALSE) + SET(TD_WINDOWS_32 FALSE) SET(TD_PAGMODE_LITE FALSE) IF (${PAGMODE} MATCHES "lite") @@ -161,6 +162,11 @@ IF (NOT DEFINED TD_CLUSTER) SET(TD_OS_DIR ${TD_COMMUNITY_DIR}/src/os/windows) ADD_DEFINITIONS(-D_M_X64) MESSAGE(STATUS "The current platform is Windows 64-bit") + ELSEIF(${CMAKE_SIZEOF_VOID_P} MATCHES 4) + SET(TD_WINDOWS_32 TRUE) + SET(TD_OS_DIR ${TD_COMMUNITY_DIR}/src/os/windows) + #ADD_DEFINITIONS(-D_M_X64) + MESSAGE(STATUS "The current platform is Windows 32-bit") ELSE () MESSAGE(FATAL_ERROR "The current platform is Windows 32-bit, not supported yet") EXIT () @@ -228,7 +234,7 @@ IF (NOT DEFINED TD_CLUSTER) link_library(/usr/lib/libargp.a) ADD_DEFINITIONS(-D_ALPINE) ENDIF () - ELSEIF (TD_WINDOWS_64) + ELSEIF (TD_WINDOWS_64 OR TD_WINDOWS_32) SET(CMAKE_GENERATOR "NMake Makefiles" CACHE INTERNAL "" FORCE) IF (NOT TD_GODLL) SET(COMMON_FLAGS "/nologo /WX- /Oi /Oy- /Gm- /EHsc /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Gd /errorReport:prompt /analyze-") @@ -269,7 +275,7 @@ IF (NOT DEFINED TD_CLUSTER) ELSEIF (${CMAKE_BUILD_TYPE} MATCHES "Release") MESSAGE(STATUS "Build Release Version") ELSE () - IF (TD_WINDOWS_64) + IF (TD_WINDOWS_64 OR TD_WINDOWS_32) SET(CMAKE_BUILD_TYPE "Release") MESSAGE(STATUS "Build Release Version in Windows as default") ELSE () @@ -302,7 +308,7 @@ IF (NOT DEFINED TD_CLUSTER) INSTALL(CODE "MESSAGE(\"make install script: ${TD_MAKE_INSTALL_SH}\")") INSTALL(CODE "execute_process(COMMAND chmod 777 ${TD_MAKE_INSTALL_SH})") INSTALL(CODE "execute_process(COMMAND ${TD_MAKE_INSTALL_SH} ${TD_COMMUNITY_DIR} ${PROJECT_BINARY_DIR})") - ELSEIF (TD_WINDOWS_64) + ELSEIF (TD_WINDOWS_64 OR TD_WINDOWS_32) SET(CMAKE_INSTALL_PREFIX C:/${DB_FULL_NAME}) IF (NOT TD_GODLL) INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/src/connector/go DESTINATION connector) @@ -311,6 +317,7 @@ IF (NOT DEFINED TD_CLUSTER) INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/tests/examples DESTINATION .) INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/packaging/cfg DESTINATION .) INSTALL(FILES ${TD_COMMUNITY_DIR}/src/inc/taos.h DESTINATION include) + INSTALL(FILES ${TD_COMMUNITY_DIR}/src/inc/taoserror.h DESTINATION include) INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos.lib DESTINATION driver) INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos.exp DESTINATION driver) INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos.dll DESTINATION driver) diff --git a/deps/iconv/CMakeLists.txt b/deps/iconv/CMakeLists.txt index 944cb400e0c80a92f27aed159a4886ed25d9af6d..b2a5dce903793dcdb228ebe39e8f4f41171015aa 100644 --- a/deps/iconv/CMakeLists.txt +++ b/deps/iconv/CMakeLists.txt @@ -1,7 +1,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(TDengine) -IF (TD_WINDOWS_64) +IF (TD_WINDOWS_64 OR TD_WINDOWS_32) LIST(APPEND SRC iconv.c) LIST(APPEND SRC localcharset.c) INCLUDE_DIRECTORIES(.) diff --git a/deps/pthread/CMakeLists.txt b/deps/pthread/CMakeLists.txt index a218d05bab036685b5a3e2e86a75cc5af26eaee5..4526d4a6512184a05f6025673b04eb962ce9aefb 100644 --- a/deps/pthread/CMakeLists.txt +++ b/deps/pthread/CMakeLists.txt @@ -1,7 +1,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(TDengine) -IF (TD_WINDOWS_64) +IF (TD_WINDOWS_64 OR TD_WINDOWS_32) INCLUDE_DIRECTORIES(.) LIST(APPEND SRC pthread.c) ADD_LIBRARY(pthread ${SRC}) diff --git a/deps/regex/CMakeLists.txt b/deps/regex/CMakeLists.txt index 8f8396caa45f56ff5759b1f2cc55ae28086be6ab..5a6dd9d7d8e9e5b0ac337962bc3664a9646df853 100644 --- a/deps/regex/CMakeLists.txt +++ b/deps/regex/CMakeLists.txt @@ -1,7 +1,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(TDengine) -IF (TD_WINDOWS_64) +IF (TD_WINDOWS_64 OR TD_WINDOWS_32) INCLUDE_DIRECTORIES(inc .) LIST(APPEND SRC regex.c) ADD_LIBRARY(regex ${SRC}) diff --git a/documentation/webdocs/markdowndocs/Connector.md b/documentation/webdocs/markdowndocs/Connector.md index a0433d1f09d7c5f2ec1205f89d2efe638703dc7d..9111279a92448ef72fb8fb24cc6200fc2a7c4962 100644 --- a/documentation/webdocs/markdowndocs/Connector.md +++ b/documentation/webdocs/markdowndocs/Connector.md @@ -740,12 +740,12 @@ The return value is like: ## Go Connector -TDengine also provides a Go client package named _taosSql_ for users to access TDengine with Go. The package is in _/usr/local/taos/connector/go/src/taosSql_ by default if you installed TDengine. Users can copy the directory _/usr/local/taos/connector/go/src/taosSql_ to the _src_ directory of your project and import the package in the source code for use. +TDengine also provides a Go client package named _taosSql_ for users to access TDengine with Go. The package is in _/usr/local/taos/connector/go/driver-go/taosSql_ by default if you installed TDengine. Users can copy the directory _/usr/local/taos/connector/go/driver-go/taosSql_ to the _src_ directory of your project and import the package in the source code for use. ```Go import ( "database/sql" - _ "taosSql" + _ "github.com/taosdata/driver-go/taosSql" ) ```