diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e37a14143c3c7e2521692ac0e95d6753f372109..0603055e3c9db74ea3cf1bc1fc27f87226b11c24 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,13 +6,17 @@ project( DESCRIPTION "An open-source big data platform designed and optimized for the Internet of Things(IOT)" ) -set(CMAKE_SUPPORT_DIR "${CMAKE_SOURCE_DIR}/cmake") -set(CMAKE_CONTRIB_DIR "${CMAKE_SOURCE_DIR}/contrib") +if (NOT DEFINED TD_SOURCE_DIR) + set( TD_SOURCE_DIR ${CMAKE_SOURCE_DIR} ) +endif() -include(${CMAKE_SUPPORT_DIR}/cmake.platform) -include(${CMAKE_SUPPORT_DIR}/cmake.define) -include(${CMAKE_SUPPORT_DIR}/cmake.options) -include(${CMAKE_SUPPORT_DIR}/cmake.version) +set(TD_SUPPORT_DIR "${TD_SOURCE_DIR}/cmake") +set(TD_CONTRIB_DIR "${TD_SOURCE_DIR}/contrib") + +include(${TD_SUPPORT_DIR}/cmake.platform) +include(${TD_SUPPORT_DIR}/cmake.define) +include(${TD_SUPPORT_DIR}/cmake.options) +include(${TD_SUPPORT_DIR}/cmake.version) # contrib add_subdirectory(contrib) diff --git a/cmake/bdb_CMakeLists.txt.in.bak b/cmake/bdb_CMakeLists.txt.in.bak index 52cef74db6b0252f7058cb4d8322499f027deabe..dd210201051cecd0d8e3f193072ea8ad0b8f02c4 100644 --- a/cmake/bdb_CMakeLists.txt.in.bak +++ b/cmake/bdb_CMakeLists.txt.in.bak @@ -3,8 +3,8 @@ ExternalProject_Add(bdb GIT_REPOSITORY https://github.com/berkeleydb/libdb.git GIT_TAG v5.3.28 - SOURCE_DIR "${CMAKE_CONTRIB_DIR}/bdb" - BINARY_DIR "${CMAKE_CONTRIB_DIR}/bdb" + SOURCE_DIR "${TD_CONTRIB_DIR}/bdb" + BINARY_DIR "${TD_CONTRIB_DIR}/bdb" #BUILD_IN_SOURCE TRUE CONFIGURE_COMMAND COMMAND ./dist/configure --enable-debug BUILD_COMMAND "$(MAKE)" diff --git a/cmake/cjson_CMakeLists.txt.in b/cmake/cjson_CMakeLists.txt.in index c9ec90e80901c8bc9ba202708e14c48b67a1b763..32cea7baa16abbb95f1f5821119f098183f73df7 100644 --- a/cmake/cjson_CMakeLists.txt.in +++ b/cmake/cjson_CMakeLists.txt.in @@ -3,7 +3,7 @@ ExternalProject_Add(cjson GIT_REPOSITORY https://github.com/taosdata-contrib/cJSON.git GIT_TAG v1.7.15 - SOURCE_DIR "${CMAKE_CONTRIB_DIR}/cJson" + SOURCE_DIR "${TD_CONTRIB_DIR}/cJson" BINARY_DIR "" CONFIGURE_COMMAND "" BUILD_COMMAND "" diff --git a/cmake/craft_CMakeLists.txt.in b/cmake/craft_CMakeLists.txt.in index 3a951c1c99abfb04e9bc7bb13aef55e7fb79a395..f0ec7feaf204cf73c6e51e5a429fa8d64d6ec01a 100644 --- a/cmake/craft_CMakeLists.txt.in +++ b/cmake/craft_CMakeLists.txt.in @@ -3,8 +3,8 @@ ExternalProject_Add(craft GIT_REPOSITORY https://github.com/canonical/raft.git GIT_TAG v0.11.2 - SOURCE_DIR "${CMAKE_CONTRIB_DIR}/craft" - BINARY_DIR "${CMAKE_CONTRIB_DIR}/craft" + SOURCE_DIR "${TD_CONTRIB_DIR}/craft" + BINARY_DIR "${TD_CONTRIB_DIR}/craft" #BUILD_IN_SOURCE TRUE # https://answers.ros.org/question/333125/how-to-include-external-automakeautoconf-projects-into-ament_cmake/ CONFIGURE_COMMAND COMMAND autoreconf -i COMMAND ./configure --enable-example diff --git a/cmake/gnuregex_CMakeLists.txt.in b/cmake/gnuregex_CMakeLists.txt.in index e0c07fe3baf00be29f8ca202596ed5baf1f2377b..817c22093a3fedfbc9612f807875a4153cca8655 100644 --- a/cmake/gnuregex_CMakeLists.txt.in +++ b/cmake/gnuregex_CMakeLists.txt.in @@ -3,7 +3,7 @@ ExternalProject_Add(gnuregex URL https://launchpad.net/gnuregex/trunk/2.9/+download/libgnurx-src-2.9.zip DOWNLOAD_NAME libgnurx-src.zip - SOURCE_DIR "${CMAKE_CONTRIB_DIR}/gnuregex" + SOURCE_DIR "${TD_CONTRIB_DIR}/gnuregex" BINARY_DIR "" #BUILD_IN_SOURCE TRUE CONFIGURE_COMMAND "" diff --git a/cmake/gtest_CMakeLists.txt.in b/cmake/gtest_CMakeLists.txt.in index 98701456cfa3c1841a68f624d9a0c1f760fa6faf..fe07f2318b4f9a8758b351c8a9afbd9c8c109f44 100644 --- a/cmake/gtest_CMakeLists.txt.in +++ b/cmake/gtest_CMakeLists.txt.in @@ -3,7 +3,7 @@ ExternalProject_Add(googletest GIT_REPOSITORY https://github.com/taosdata-contrib/googletest.git GIT_TAG release-1.11.0 - SOURCE_DIR "${CMAKE_CONTRIB_DIR}/googletest" + SOURCE_DIR "${TD_CONTRIB_DIR}/googletest" BINARY_DIR "" CONFIGURE_COMMAND "" BUILD_COMMAND "" diff --git a/cmake/iconv_CMakeLists.txt.in b/cmake/iconv_CMakeLists.txt.in index 31dfd829fcbc8a5cc6a4b28752eda76280b3c791..5eb277ce0df81797928ea909db28d24dd33a2915 100644 --- a/cmake/iconv_CMakeLists.txt.in +++ b/cmake/iconv_CMakeLists.txt.in @@ -3,7 +3,7 @@ ExternalProject_Add(iconv GIT_REPOSITORY https://github.com/win-iconv/win-iconv.git GIT_TAG v0.0.8 - SOURCE_DIR "${CMAKE_CONTRIB_DIR}/iconv" + SOURCE_DIR "${TD_CONTRIB_DIR}/iconv" BINARY_DIR "" CONFIGURE_COMMAND "" BUILD_COMMAND "" diff --git a/cmake/leveldb_CMakeLists.txt.in b/cmake/leveldb_CMakeLists.txt.in index ac8a097b25e5556fc31d86728bf70c1179a270b2..6878711bc1feff967a946bcec8ba0cf20f97fe82 100644 --- a/cmake/leveldb_CMakeLists.txt.in +++ b/cmake/leveldb_CMakeLists.txt.in @@ -3,7 +3,7 @@ ExternalProject_Add(leveldb GIT_REPOSITORY https://github.com/taosdata-contrib/leveldb.git GIT_TAG master - SOURCE_DIR "${CMAKE_CONTRIB_DIR}/leveldb" + SOURCE_DIR "${TD_CONTRIB_DIR}/leveldb" BINARY_DIR "" #BUILD_IN_SOURCE TRUE CONFIGURE_COMMAND "" diff --git a/cmake/libuv_CMakeLists.txt.in b/cmake/libuv_CMakeLists.txt.in index 6c7ab79ed29a39725771d8aa20ede47e50597ae5..14228b775f46fbde420b9e99117f3ebc0de03e88 100644 --- a/cmake/libuv_CMakeLists.txt.in +++ b/cmake/libuv_CMakeLists.txt.in @@ -3,8 +3,8 @@ ExternalProject_Add(libuv GIT_REPOSITORY https://github.com/libuv/libuv.git GIT_TAG v1.42.0 - SOURCE_DIR "${CMAKE_CONTRIB_DIR}/libuv" - BINARY_DIR "${CMAKE_CONTRIB_DIR}/libuv" + SOURCE_DIR "${TD_CONTRIB_DIR}/libuv" + BINARY_DIR "${TD_CONTRIB_DIR}/libuv" CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND "" diff --git a/cmake/lucene_CMakeLists.txt.in b/cmake/lucene_CMakeLists.txt.in index d2a453df2f8795f178e97feaa2cbe7d737c3b086..9fd747170524f6805dfe27b42970f516b913692c 100644 --- a/cmake/lucene_CMakeLists.txt.in +++ b/cmake/lucene_CMakeLists.txt.in @@ -2,7 +2,7 @@ # lucene ExternalProject_Add(lucene GIT_REPOSITORY https://github.com/yihaoDeng/LucenePlusPlus.git - SOURCE_DIR "${CMAKE_CONTRIB_DIR}/lucene" + SOURCE_DIR "${TD_CONTRIB_DIR}/lucene" BINARY_DIR "" #BUILD_IN_SOURCE TRUE CONFIGURE_COMMAND "" diff --git a/cmake/lz4_CMakeLists.txt.in b/cmake/lz4_CMakeLists.txt.in index 199b325b09b43bc19e8d04e2110f7630e85b3f11..381f8f5c5b88b6adaf1dda0493e00efe8576f7b9 100644 --- a/cmake/lz4_CMakeLists.txt.in +++ b/cmake/lz4_CMakeLists.txt.in @@ -3,7 +3,7 @@ ExternalProject_Add(lz4 GIT_REPOSITORY https://github.com/taosdata-contrib/lz4.git GIT_TAG v1.9.3 - SOURCE_DIR "${CMAKE_CONTRIB_DIR}/lz4" + SOURCE_DIR "${TD_CONTRIB_DIR}/lz4" BINARY_DIR "" CONFIGURE_COMMAND "" BUILD_COMMAND "" diff --git a/cmake/nuraft_CMakeLists.txt.in b/cmake/nuraft_CMakeLists.txt.in index 970cb3a830b1ebc76479f860462a3a3f1de3d55a..593c6fed26b18a4a4278379a22d782e551ca7188 100644 --- a/cmake/nuraft_CMakeLists.txt.in +++ b/cmake/nuraft_CMakeLists.txt.in @@ -3,8 +3,8 @@ ExternalProject_Add(NuRaft GIT_REPOSITORY https://github.com/eBay/NuRaft.git GIT_TAG v1.3.0 - SOURCE_DIR "${CMAKE_CONTRIB_DIR}/nuraft" - BINARY_DIR "${CMAKE_CONTRIB_DIR}/nuraft" + SOURCE_DIR "${TD_CONTRIB_DIR}/nuraft" + BINARY_DIR "${TD_CONTRIB_DIR}/nuraft" CONFIGURE_COMMAND "./prepare.sh" BUILD_COMMAND "" INSTALL_COMMAND "" diff --git a/cmake/pthread_CMakeLists.txt.in b/cmake/pthread_CMakeLists.txt.in index ee6d0691550eb1ea9f9fe6cd7fee99a5a4ebfe20..2553df65001eb9728ec734ebb8b02fdbc722c3c2 100644 --- a/cmake/pthread_CMakeLists.txt.in +++ b/cmake/pthread_CMakeLists.txt.in @@ -3,7 +3,7 @@ ExternalProject_Add(pthread GIT_REPOSITORY https://github.com/GerHobbelt/pthread-win32 GIT_TAG v3.0.3.1 - SOURCE_DIR "${CMAKE_CONTRIB_DIR}/pthread-win32" + SOURCE_DIR "${TD_CONTRIB_DIR}/pthread-win32" BINARY_DIR "" #BUILD_IN_SOURCE TRUE CONFIGURE_COMMAND "" diff --git a/cmake/rocksdb_CMakeLists.txt.in b/cmake/rocksdb_CMakeLists.txt.in index e38cd876f68936ac0c891353417e493804d606f8..58ae9a1c599acd1b7fc236470c58ada319a272f6 100644 --- a/cmake/rocksdb_CMakeLists.txt.in +++ b/cmake/rocksdb_CMakeLists.txt.in @@ -3,7 +3,7 @@ ExternalProject_Add(rocksdb GIT_REPOSITORY https://github.com/taosdata-contrib/rocksdb.git GIT_TAG v6.23.3 - SOURCE_DIR "${CMAKE_CONTRIB_DIR}/rocksdb" + SOURCE_DIR "${TD_CONTRIB_DIR}/rocksdb" CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND "" diff --git a/cmake/sqlite_CMakeLists.txt.in b/cmake/sqlite_CMakeLists.txt.in index 95308833db6b5304863a752e3c8eb36709460efd..445c49487a7f8eec58c367f1e57c344c50c33166 100644 --- a/cmake/sqlite_CMakeLists.txt.in +++ b/cmake/sqlite_CMakeLists.txt.in @@ -3,8 +3,8 @@ ExternalProject_Add(sqlite GIT_REPOSITORY https://github.com/sqlite/sqlite.git GIT_TAG version-3.36.0 - SOURCE_DIR "${CMAKE_CONTRIB_DIR}/sqlite" - BINARY_DIR "${CMAKE_CONTRIB_DIR}/sqlite" + SOURCE_DIR "${TD_CONTRIB_DIR}/sqlite" + BINARY_DIR "${TD_CONTRIB_DIR}/sqlite" #BUILD_IN_SOURCE TRUE CONFIGURE_COMMAND "./configure" BUILD_COMMAND "$(MAKE)" diff --git a/cmake/stub_CMakeLists.txt.in b/cmake/stub_CMakeLists.txt.in index e227e820d639865c9b440e3137b3b98f2cf7aade..cf175aab422ce4710b48ae501fa65b59481b772e 100644 --- a/cmake/stub_CMakeLists.txt.in +++ b/cmake/stub_CMakeLists.txt.in @@ -3,8 +3,8 @@ ExternalProject_Add(stub GIT_REPOSITORY https://github.com/coolxv/cpp-stub.git GIT_SUBMODULES "src" - SOURCE_DIR "${CMAKE_CONTRIB_DIR}/cpp-stub" - BINARY_DIR "${CMAKE_CONTRIB_DIR}/cpp-stub/src" + SOURCE_DIR "${TD_CONTRIB_DIR}/cpp-stub" + BINARY_DIR "${TD_CONTRIB_DIR}/cpp-stub/src" CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND "" diff --git a/cmake/traft_CMakeLists.txt.in b/cmake/traft_CMakeLists.txt.in index 1dd13236033b2cb43ec4a79da34c9b26c387f43b..0934e2c35c9be30f8f3724f731bddde1ec0c7421 100644 --- a/cmake/traft_CMakeLists.txt.in +++ b/cmake/traft_CMakeLists.txt.in @@ -3,8 +3,8 @@ ExternalProject_Add(traft GIT_REPOSITORY https://github.com/taosdata/traft.git GIT_TAG for_3.0 - SOURCE_DIR "${CMAKE_CONTRIB_DIR}/traft" - BINARY_DIR "${CMAKE_CONTRIB_DIR}/traft" + SOURCE_DIR "${TD_CONTRIB_DIR}/traft" + BINARY_DIR "${TD_CONTRIB_DIR}/traft" #BUILD_IN_SOURCE TRUE # https://answers.ros.org/question/333125/how-to-include-external-automakeautoconf-projects-into-ament_cmake/ CONFIGURE_COMMAND COMMAND autoreconf -i COMMAND ./configure diff --git a/cmake/zlib_CMakeLists.txt.in b/cmake/zlib_CMakeLists.txt.in index 160d3305d0815306b2f76e4c3a18d8d02ceecd89..6c162eb5dec48d3b72b17b4f0e1d5bfca0b122bf 100644 --- a/cmake/zlib_CMakeLists.txt.in +++ b/cmake/zlib_CMakeLists.txt.in @@ -3,7 +3,7 @@ ExternalProject_Add(zlib GIT_REPOSITORY https://github.com/taosdata-contrib/zlib.git GIT_TAG v1.2.11 - SOURCE_DIR "${CMAKE_CONTRIB_DIR}/zlib" + SOURCE_DIR "${TD_CONTRIB_DIR}/zlib" BINARY_DIR "" #BUILD_IN_SOURCE TRUE CONFIGURE_COMMAND "" diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index 377e3fbcccc2b0f45bff92eec9e1526b71b1d5ef..1ddc765c5c5a93dd4b8a6001ebede7c3bde22a59 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -7,88 +7,88 @@ function(cat IN_FILE OUT_FILE) endfunction(cat IN_FILE OUT_FILE) set(CONTRIB_TMP_FILE "${CMAKE_BINARY_DIR}/deps_tmp_CMakeLists.txt.in") -configure_file("${CMAKE_SUPPORT_DIR}/deps_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) +configure_file("${TD_SUPPORT_DIR}/deps_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) # pthread if(${BUILD_PTHREAD}) - cat("${CMAKE_SUPPORT_DIR}/pthread_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) + cat("${TD_SUPPORT_DIR}/pthread_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) endif() # gnu regex if(${BUILD_GNUREGEX}) - cat("${CMAKE_SUPPORT_DIR}/gnuregex_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) + cat("${TD_SUPPORT_DIR}/gnuregex_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) endif() # googletest if(${BUILD_TEST}) - cat("${CMAKE_SUPPORT_DIR}/gtest_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) - cat("${CMAKE_SUPPORT_DIR}/stub_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) + cat("${TD_SUPPORT_DIR}/gtest_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) + cat("${TD_SUPPORT_DIR}/stub_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) endif(${BUILD_TEST}) # lz4 -cat("${CMAKE_SUPPORT_DIR}/lz4_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) +cat("${TD_SUPPORT_DIR}/lz4_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) # zlib -cat("${CMAKE_SUPPORT_DIR}/zlib_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) +cat("${TD_SUPPORT_DIR}/zlib_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) # cJson -cat("${CMAKE_SUPPORT_DIR}/cjson_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) +cat("${TD_SUPPORT_DIR}/cjson_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) # leveldb if(${BUILD_WITH_LEVELDB}) - cat("${CMAKE_SUPPORT_DIR}/leveldb_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) + cat("${TD_SUPPORT_DIR}/leveldb_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) endif(${BUILD_WITH_LEVELDB}) # rocksdb if(${BUILD_WITH_ROCKSDB}) - cat("${CMAKE_SUPPORT_DIR}/rocksdb_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) + cat("${TD_SUPPORT_DIR}/rocksdb_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) add_definitions(-DUSE_ROCKSDB) endif(${BUILD_WITH_ROCKSDB}) # canonical-raft if(${BUILD_WITH_CRAFT}) - cat("${CMAKE_SUPPORT_DIR}/craft_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) + cat("${TD_SUPPORT_DIR}/craft_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) SET(BUILD_WITH_UV ON CACHE BOOL "craft need libuv" FORCE) endif(${BUILD_WITH_CRAFT}) # traft if(${BUILD_WITH_TRAFT}) - cat("${CMAKE_SUPPORT_DIR}/traft_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) + cat("${TD_SUPPORT_DIR}/traft_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) SET(BUILD_WITH_UV ON CACHE BOOL "traft need libuv" FORCE) endif(${BUILD_WITH_TRAFT}) #libuv if(${BUILD_WITH_UV}) - cat("${CMAKE_SUPPORT_DIR}/libuv_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) + cat("${TD_SUPPORT_DIR}/libuv_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) endif(${BUILD_WITH_UV}) # bdb #if(${BUILD_WITH_BDB}) - #cat("${CMAKE_SUPPORT_DIR}/bdb_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) + #cat("${TD_SUPPORT_DIR}/bdb_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) #endif(${BUILD_WITH_BDB}) # sqlite if(${BUILD_WITH_SQLITE}) - cat("${CMAKE_SUPPORT_DIR}/sqlite_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) + cat("${TD_SUPPORT_DIR}/sqlite_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) endif(${BUILD_WITH_SQLITE}) # lucene if(${BUILD_WITH_LUCENE}) - cat("${CMAKE_SUPPORT_DIR}/lucene_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) + cat("${TD_SUPPORT_DIR}/lucene_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) add_definitions(-DUSE_LUCENE) endif(${BUILD_WITH_LUCENE}) # NuRaft if(${BUILD_WITH_NURAFT}) - cat("${CMAKE_SUPPORT_DIR}/nuraft_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) + cat("${TD_SUPPORT_DIR}/nuraft_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) endif(${BUILD_WITH_NURAFT}) # download dependencies -configure_file(${CONTRIB_TMP_FILE} "${CMAKE_CONTRIB_DIR}/deps-download/CMakeLists.txt") +configure_file(${CONTRIB_TMP_FILE} "${TD_CONTRIB_DIR}/deps-download/CMakeLists.txt") execute_process(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . - WORKING_DIRECTORY "${CMAKE_CONTRIB_DIR}/deps-download") + WORKING_DIRECTORY "${TD_CONTRIB_DIR}/deps-download") execute_process(COMMAND "${CMAKE_COMMAND}" --build . - WORKING_DIRECTORY "${CMAKE_CONTRIB_DIR}/deps-download") + WORKING_DIRECTORY "${TD_CONTRIB_DIR}/deps-download") # ================================================================================================ # Build @@ -105,7 +105,7 @@ endif(${BUILD_TEST}) # cJson # see https://stackoverflow.com/questions/37582508/silence-cmp0048-warnings-in-vendored-projects -set(CMAKE_PROJECT_INCLUDE_BEFORE "${CMAKE_SUPPORT_DIR}/EnableCMP0048.txt.in") +set(CMAKE_PROJECT_INCLUDE_BEFORE "${TD_SUPPORT_DIR}/EnableCMP0048.txt.in") option(ENABLE_CJSON_TEST "Enable building cJSON test" OFF) option(CJSON_OVERRIDE_BUILD_SHARED_LIBS "Override BUILD_SHARED_LIBS with CJSON_BUILD_SHARED_LIBS" ON) option(CJSON_BUILD_SHARED_LIBS "Overrides BUILD_SHARED_LIBS if CJSON_OVERRIDE_BUILD_SHARED_LIBS is enabled" OFF) @@ -125,7 +125,7 @@ target_include_directories( ) # zlib -set(CMAKE_PROJECT_INCLUDE_BEFORE "${CMAKE_SUPPORT_DIR}/EnableCMP0048.txt.in") +set(CMAKE_PROJECT_INCLUDE_BEFORE "${TD_SUPPORT_DIR}/EnableCMP0048.txt.in") add_subdirectory(zlib) target_include_directories( zlibstatic diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 59552c67d7de0ff6fba0cdb9586687beac190e5a..da76b2c3fd9d8e2abbead43080984af48d02ed4c 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -4,7 +4,7 @@ if(${BUILD_DOCS}) find_package(Doxygen) if (DOXYGEN_FOUND) # Build the doc - set(DOXYGEN_IN ${CMAKE_SOURCE_DIR}/docs/Doxyfile.in) + set(DOXYGEN_IN ${TD_SOURCE_DIR}/docs/Doxyfile.in) set(DOXYGEN_OUT ${CMAKE_BINARY_DIR}/Doxyfile) configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY) diff --git a/docs/Doxyfile.in b/docs/Doxyfile.in index 139300ea80b4e2c6f0abcd0fbbfcc16cdbec8912..6ca240f52f4211576601d25e19323a6bde54296b 100644 --- a/docs/Doxyfile.in +++ b/docs/Doxyfile.in @@ -829,7 +829,7 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = @CMAKE_SOURCE_DIR@/include @CMAKE_SOURCE_DIR@/source +INPUT = @TD_SOURCE_DIR@/include @TD_SOURCE_DIR@/source # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/include/common/tglobal.h b/include/common/tglobal.h index 006d5849dedc19c4d6c9266b9037bdb2e6af6941..f03943e1053dd1cc8834afa6fa0823ce62443c7e 100644 --- a/include/common/tglobal.h +++ b/include/common/tglobal.h @@ -126,6 +126,7 @@ int32_t taosCreateLog(const char *logname, int32_t logFileNum, const char *cfgDi int32_t taosInitCfg(const char *cfgDir, const char *envFile, const char *apolloUrl, SArray *pArgs, bool tsc); void taosCleanupCfg(); void taosCfgDynamicOptions(const char *option, const char *value); +void taosAddDataDir(int32_t index, char *v1, int32_t level, int32_t primary); struct SConfig *taosGetCfg(); diff --git a/include/common/tgrant.h b/include/common/tgrant.h new file mode 100644 index 0000000000000000000000000000000000000000..962af0ddc4b431313871e8d46f3c58c609da2479 --- /dev/null +++ b/include/common/tgrant.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#ifndef TDENGINE_GTANT_H +#define TDENGINE_GTANT_H + +#ifdef __cplusplus +"C" { +#endif + +typedef enum { + TSDB_GRANT_ALL, + TSDB_GRANT_TIME, + TSDB_GRANT_USER, + TSDB_GRANT_DB, + TSDB_GRANT_TIMESERIES, + TSDB_GRANT_DNODE, + TSDB_GRANT_ACCT, + TSDB_GRANT_STORAGE, + TSDB_GRANT_SPEED, + TSDB_GRANT_QUERY_TIME, + TSDB_GRANT_CONNS, + TSDB_GRANT_STREAMS, + TSDB_GRANT_CPU_CORES, +} EGrantType; + +int32_t grantInit(); +void grantCleanUp(); +void grantParseParameter(); +int32_t grantCheck(EGrantType grant); +void grantReset(EGrantType grant, uint64_t value); +void grantAdd(EGrantType grant, uint64_t value); +void grantRestore(EGrantType grant, uint64_t value); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/include/util/taoserror.h b/include/util/taoserror.h index 93efbdb98918cf00f7e55403258926c4b7187646..04baa3c09d2048d033b877bdda71557367229d20 100644 --- a/include/util/taoserror.h +++ b/include/util/taoserror.h @@ -428,6 +428,108 @@ int32_t* taosGetErrno(); #define TSDB_CODE_WAL_INVALID_VER TAOS_DEF_ERROR_CODE(0, 0x1003) #define TSDB_CODE_WAL_OUT_OF_MEMORY TAOS_DEF_ERROR_CODE(0, 0x1004) +// http +#define TSDB_CODE_HTTP_SERVER_OFFLINE TAOS_DEF_ERROR_CODE(0, 0x1100) //"http server is not online" +#define TSDB_CODE_HTTP_UNSUPPORT_URL TAOS_DEF_ERROR_CODE(0, 0x1101) //"url is not support" +#define TSDB_CODE_HTTP_INVALID_URL TAOS_DEF_ERROR_CODE(0, 0x1102) //invalid url format" +#define TSDB_CODE_HTTP_NO_ENOUGH_MEMORY TAOS_DEF_ERROR_CODE(0, 0x1103) //"no enough memory" +#define TSDB_CODE_HTTP_REQUSET_TOO_BIG TAOS_DEF_ERROR_CODE(0, 0x1104) //"request size is too big" +#define TSDB_CODE_HTTP_NO_AUTH_INFO TAOS_DEF_ERROR_CODE(0, 0x1105) //"no auth info input" +#define TSDB_CODE_HTTP_NO_MSG_INPUT TAOS_DEF_ERROR_CODE(0, 0x1106) //"request is empty" +#define TSDB_CODE_HTTP_NO_SQL_INPUT TAOS_DEF_ERROR_CODE(0, 0x1107) //"no sql input" +#define TSDB_CODE_HTTP_NO_EXEC_USEDB TAOS_DEF_ERROR_CODE(0, 0x1108) //"no need to execute use db cmd" +#define TSDB_CODE_HTTP_SESSION_FULL TAOS_DEF_ERROR_CODE(0, 0x1109) //"session list was full" +#define TSDB_CODE_HTTP_GEN_TAOSD_TOKEN_ERR TAOS_DEF_ERROR_CODE(0, 0x110A) //"generate taosd token error" +#define TSDB_CODE_HTTP_INVALID_MULTI_REQUEST TAOS_DEF_ERROR_CODE(0, 0x110B) //"size of multi request is 0" +#define TSDB_CODE_HTTP_CREATE_GZIP_FAILED TAOS_DEF_ERROR_CODE(0, 0x110C) //"failed to create gzip" +#define TSDB_CODE_HTTP_FINISH_GZIP_FAILED TAOS_DEF_ERROR_CODE(0, 0x110D) //"failed to finish gzip" +#define TSDB_CODE_HTTP_LOGIN_FAILED TAOS_DEF_ERROR_CODE(0, 0x110E) //"failed to login" + +#define TSDB_CODE_HTTP_INVALID_VERSION TAOS_DEF_ERROR_CODE(0, 0x1120) //"invalid http version" +#define TSDB_CODE_HTTP_INVALID_CONTENT_LENGTH TAOS_DEF_ERROR_CODE(0, 0x1121) //"invalid content length" +#define TSDB_CODE_HTTP_INVALID_AUTH_TYPE TAOS_DEF_ERROR_CODE(0, 0x1122) //"invalid type of Authorization" +#define TSDB_CODE_HTTP_INVALID_AUTH_FORMAT TAOS_DEF_ERROR_CODE(0, 0x1123) //"invalid format of Authorization" +#define TSDB_CODE_HTTP_INVALID_BASIC_AUTH TAOS_DEF_ERROR_CODE(0, 0x1124) //"invalid basic Authorization" +#define TSDB_CODE_HTTP_INVALID_TAOSD_AUTH TAOS_DEF_ERROR_CODE(0, 0x1125) //"invalid taosd Authorization" +#define TSDB_CODE_HTTP_PARSE_METHOD_FAILED TAOS_DEF_ERROR_CODE(0, 0x1126) //"failed to parse method" +#define TSDB_CODE_HTTP_PARSE_TARGET_FAILED TAOS_DEF_ERROR_CODE(0, 0x1127) //"failed to parse target" +#define TSDB_CODE_HTTP_PARSE_VERSION_FAILED TAOS_DEF_ERROR_CODE(0, 0x1128) //"failed to parse http version" +#define TSDB_CODE_HTTP_PARSE_SP_FAILED TAOS_DEF_ERROR_CODE(0, 0x1129) //"failed to parse sp" +#define TSDB_CODE_HTTP_PARSE_STATUS_FAILED TAOS_DEF_ERROR_CODE(0, 0x112A) //"failed to parse status" +#define TSDB_CODE_HTTP_PARSE_PHRASE_FAILED TAOS_DEF_ERROR_CODE(0, 0x112B) //"failed to parse phrase" +#define TSDB_CODE_HTTP_PARSE_CRLF_FAILED TAOS_DEF_ERROR_CODE(0, 0x112C) //"failed to parse crlf" +#define TSDB_CODE_HTTP_PARSE_HEADER_FAILED TAOS_DEF_ERROR_CODE(0, 0x112D) //"failed to parse header" +#define TSDB_CODE_HTTP_PARSE_HEADER_KEY_FAILED TAOS_DEF_ERROR_CODE(0, 0x112E) //"failed to parse header key" +#define TSDB_CODE_HTTP_PARSE_HEADER_VAL_FAILED TAOS_DEF_ERROR_CODE(0, 0x112F) //"failed to parse header val" +#define TSDB_CODE_HTTP_PARSE_CHUNK_SIZE_FAILED TAOS_DEF_ERROR_CODE(0, 0x1130) //"failed to parse chunk size" +#define TSDB_CODE_HTTP_PARSE_CHUNK_FAILED TAOS_DEF_ERROR_CODE(0, 0x1131) //"failed to parse chunk" +#define TSDB_CODE_HTTP_PARSE_END_FAILED TAOS_DEF_ERROR_CODE(0, 0x1132) //"failed to parse end section" +#define TSDB_CODE_HTTP_PARSE_INVALID_STATE TAOS_DEF_ERROR_CODE(0, 0x1134) //"invalid parse state" +#define TSDB_CODE_HTTP_PARSE_ERROR_STATE TAOS_DEF_ERROR_CODE(0, 0x1135) //"failed to parse error section" + +#define TSDB_CODE_HTTP_GC_QUERY_NULL TAOS_DEF_ERROR_CODE(0, 0x1150) //"query size is 0" +#define TSDB_CODE_HTTP_GC_QUERY_SIZE TAOS_DEF_ERROR_CODE(0, 0x1151) //"query size can not more than 100" +#define TSDB_CODE_HTTP_GC_REQ_PARSE_ERROR TAOS_DEF_ERROR_CODE(0, 0x1152) //"parse grafana json error" + +#define TSDB_CODE_HTTP_TG_DB_NOT_INPUT TAOS_DEF_ERROR_CODE(0, 0x1160) //"database name can not be null" +#define TSDB_CODE_HTTP_TG_DB_TOO_LONG TAOS_DEF_ERROR_CODE(0, 0x1161) //"database name too long" +#define TSDB_CODE_HTTP_TG_INVALID_JSON TAOS_DEF_ERROR_CODE(0, 0x1162) //"invalid telegraf json fromat" +#define TSDB_CODE_HTTP_TG_METRICS_NULL TAOS_DEF_ERROR_CODE(0, 0x1163) //"metrics size is 0" +#define TSDB_CODE_HTTP_TG_METRICS_SIZE TAOS_DEF_ERROR_CODE(0, 0x1164) //"metrics size can not more than 1K" +#define TSDB_CODE_HTTP_TG_METRIC_NULL TAOS_DEF_ERROR_CODE(0, 0x1165) //"metric name not find" +#define TSDB_CODE_HTTP_TG_METRIC_TYPE TAOS_DEF_ERROR_CODE(0, 0x1166) //"metric name type should be string" +#define TSDB_CODE_HTTP_TG_METRIC_NAME_NULL TAOS_DEF_ERROR_CODE(0, 0x1167) //"metric name length is 0" +#define TSDB_CODE_HTTP_TG_METRIC_NAME_LONG TAOS_DEF_ERROR_CODE(0, 0x1168) //"metric name length too long" +#define TSDB_CODE_HTTP_TG_TIMESTAMP_NULL TAOS_DEF_ERROR_CODE(0, 0x1169) //"timestamp not find" +#define TSDB_CODE_HTTP_TG_TIMESTAMP_TYPE TAOS_DEF_ERROR_CODE(0, 0x116A) //"timestamp type should be integer" +#define TSDB_CODE_HTTP_TG_TIMESTAMP_VAL_NULL TAOS_DEF_ERROR_CODE(0, 0x116B) //"timestamp value smaller than 0" +#define TSDB_CODE_HTTP_TG_TAGS_NULL TAOS_DEF_ERROR_CODE(0, 0x116C) //"tags not find" +#define TSDB_CODE_HTTP_TG_TAGS_SIZE_0 TAOS_DEF_ERROR_CODE(0, 0x116D) //"tags size is 0" +#define TSDB_CODE_HTTP_TG_TAGS_SIZE_LONG TAOS_DEF_ERROR_CODE(0, 0x116E) //"tags size too long" +#define TSDB_CODE_HTTP_TG_TAG_NULL TAOS_DEF_ERROR_CODE(0, 0x116F) //"tag is null" +#define TSDB_CODE_HTTP_TG_TAG_NAME_NULL TAOS_DEF_ERROR_CODE(0, 0x1170) //"tag name is null" +#define TSDB_CODE_HTTP_TG_TAG_NAME_SIZE TAOS_DEF_ERROR_CODE(0, 0x1171) //"tag name length too long" +#define TSDB_CODE_HTTP_TG_TAG_VALUE_TYPE TAOS_DEF_ERROR_CODE(0, 0x1172) //"tag value type should be number or string" +#define TSDB_CODE_HTTP_TG_TAG_VALUE_NULL TAOS_DEF_ERROR_CODE(0, 0x1173) //"tag value is null" +#define TSDB_CODE_HTTP_TG_TABLE_NULL TAOS_DEF_ERROR_CODE(0, 0x1174) //"table is null" +#define TSDB_CODE_HTTP_TG_TABLE_SIZE TAOS_DEF_ERROR_CODE(0, 0x1175) //"table name length too long" +#define TSDB_CODE_HTTP_TG_FIELDS_NULL TAOS_DEF_ERROR_CODE(0, 0x1176) //"fields not find" +#define TSDB_CODE_HTTP_TG_FIELDS_SIZE_0 TAOS_DEF_ERROR_CODE(0, 0x1177) //"fields size is 0" +#define TSDB_CODE_HTTP_TG_FIELDS_SIZE_LONG TAOS_DEF_ERROR_CODE(0, 0x1178) //"fields size too long" +#define TSDB_CODE_HTTP_TG_FIELD_NULL TAOS_DEF_ERROR_CODE(0, 0x1179) //"field is null" +#define TSDB_CODE_HTTP_TG_FIELD_NAME_NULL TAOS_DEF_ERROR_CODE(0, 0x117A) //"field name is null" +#define TSDB_CODE_HTTP_TG_FIELD_NAME_SIZE TAOS_DEF_ERROR_CODE(0, 0x117B) //"field name length too long" +#define TSDB_CODE_HTTP_TG_FIELD_VALUE_TYPE TAOS_DEF_ERROR_CODE(0, 0x117C) //"field value type should be number or string" +#define TSDB_CODE_HTTP_TG_FIELD_VALUE_NULL TAOS_DEF_ERROR_CODE(0, 0x117D) //"field value is null" +#define TSDB_CODE_HTTP_TG_HOST_NOT_STRING TAOS_DEF_ERROR_CODE(0, 0x117E) //"host type should be string" +#define TSDB_CODE_HTTP_TG_STABLE_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x117F) //"stable not exist" + +#define TSDB_CODE_HTTP_OP_DB_NOT_INPUT TAOS_DEF_ERROR_CODE(0, 0x1190) //"database name can not be null" +#define TSDB_CODE_HTTP_OP_DB_TOO_LONG TAOS_DEF_ERROR_CODE(0, 0x1191) //"database name too long" +#define TSDB_CODE_HTTP_OP_INVALID_JSON TAOS_DEF_ERROR_CODE(0, 0x1192) //"invalid opentsdb json fromat" +#define TSDB_CODE_HTTP_OP_METRICS_NULL TAOS_DEF_ERROR_CODE(0, 0x1193) //"metrics size is 0" +#define TSDB_CODE_HTTP_OP_METRICS_SIZE TAOS_DEF_ERROR_CODE(0, 0x1194) //"metrics size can not more than 10K" +#define TSDB_CODE_HTTP_OP_METRIC_NULL TAOS_DEF_ERROR_CODE(0, 0x1195) //"metric name not find" +#define TSDB_CODE_HTTP_OP_METRIC_TYPE TAOS_DEF_ERROR_CODE(0, 0x1196) //"metric name type should be string" +#define TSDB_CODE_HTTP_OP_METRIC_NAME_NULL TAOS_DEF_ERROR_CODE(0, 0x1197) //"metric name length is 0" +#define TSDB_CODE_HTTP_OP_METRIC_NAME_LONG TAOS_DEF_ERROR_CODE(0, 0x1198) //"metric name length can not more than 22" +#define TSDB_CODE_HTTP_OP_TIMESTAMP_NULL TAOS_DEF_ERROR_CODE(0, 0x1199) //"timestamp not find" +#define TSDB_CODE_HTTP_OP_TIMESTAMP_TYPE TAOS_DEF_ERROR_CODE(0, 0x119A) //"timestamp type should be integer" +#define TSDB_CODE_HTTP_OP_TIMESTAMP_VAL_NULL TAOS_DEF_ERROR_CODE(0, 0x119B) //"timestamp value smaller than 0" +#define TSDB_CODE_HTTP_OP_TAGS_NULL TAOS_DEF_ERROR_CODE(0, 0x119C) //"tags not find" +#define TSDB_CODE_HTTP_OP_TAGS_SIZE_0 TAOS_DEF_ERROR_CODE(0, 0x119D) //"tags size is 0" +#define TSDB_CODE_HTTP_OP_TAGS_SIZE_LONG TAOS_DEF_ERROR_CODE(0, 0x119E) //"tags size too long" +#define TSDB_CODE_HTTP_OP_TAG_NULL TAOS_DEF_ERROR_CODE(0, 0x119F) //"tag is null" +#define TSDB_CODE_HTTP_OP_TAG_NAME_NULL TAOS_DEF_ERROR_CODE(0, 0x11A0) //"tag name is null" +#define TSDB_CODE_HTTP_OP_TAG_NAME_SIZE TAOS_DEF_ERROR_CODE(0, 0x11A1) //"tag name length too long" +#define TSDB_CODE_HTTP_OP_TAG_VALUE_TYPE TAOS_DEF_ERROR_CODE(0, 0x11A2) //"tag value type should be boolean number or string" +#define TSDB_CODE_HTTP_OP_TAG_VALUE_NULL TAOS_DEF_ERROR_CODE(0, 0x11A3) //"tag value is null" +#define TSDB_CODE_HTTP_OP_TAG_VALUE_TOO_LONG TAOS_DEF_ERROR_CODE(0, 0x11A4) //"tag value can not more than 64" +#define TSDB_CODE_HTTP_OP_VALUE_NULL TAOS_DEF_ERROR_CODE(0, 0x11A5) //"value not find" +#define TSDB_CODE_HTTP_OP_VALUE_TYPE TAOS_DEF_ERROR_CODE(0, 0x11A6) //"value type should be boolean number or string" + +#define TSDB_CODE_HTTP_REQUEST_JSON_ERROR TAOS_DEF_ERROR_CODE(0, 0x1F00) //"http request json error" + // tfs #define TSDB_CODE_FS_APP_ERROR TAOS_DEF_ERROR_CODE(0, 0x2200) #define TSDB_CODE_FS_INVLD_CFG TAOS_DEF_ERROR_CODE(0, 0x2201) diff --git a/source/client/CMakeLists.txt b/source/client/CMakeLists.txt index 8ee6c31ba1d0a64f5ff74dbdb425d720eda33fd5..bbceaa8fedcd4933aa240d68aa99e12df6021f95 100644 --- a/source/client/CMakeLists.txt +++ b/source/client/CMakeLists.txt @@ -2,7 +2,7 @@ aux_source_directory(src CLIENT_SRC) add_library(taos ${CLIENT_SRC}) target_include_directories( taos - PUBLIC "${CMAKE_SOURCE_DIR}/include/client" + PUBLIC "${TD_SOURCE_DIR}/include/client" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) target_link_libraries( diff --git a/source/client/test/CMakeLists.txt b/source/client/test/CMakeLists.txt index ee5109860e52968d487cad9ace18153443974f32..73e11caa9591776b612176c73d30be355ae8d61d 100644 --- a/source/client/test/CMakeLists.txt +++ b/source/client/test/CMakeLists.txt @@ -19,12 +19,12 @@ TARGET_LINK_LIBRARIES( TARGET_INCLUDE_DIRECTORIES( clientTest - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/client/" - PRIVATE "${CMAKE_SOURCE_DIR}/source/libs/client/inc" + PUBLIC "${TD_SOURCE_DIR}/include/libs/client/" + PRIVATE "${TD_SOURCE_DIR}/source/libs/client/inc" ) TARGET_INCLUDE_DIRECTORIES( tmqTest - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/client/" - PRIVATE "${CMAKE_SOURCE_DIR}/source/libs/client/inc" + PUBLIC "${TD_SOURCE_DIR}/include/libs/client/" + PRIVATE "${TD_SOURCE_DIR}/source/libs/client/inc" ) diff --git a/source/common/CMakeLists.txt b/source/common/CMakeLists.txt index 1344b5b58c4e3ae86d4a99ab9d6d56a391d0a87a..63a04a88138184ee10ad0c78de9fcc1bcae5a0d1 100644 --- a/source/common/CMakeLists.txt +++ b/source/common/CMakeLists.txt @@ -2,11 +2,11 @@ aux_source_directory(src COMMON_SRC) add_library(common STATIC ${COMMON_SRC}) target_include_directories( common - PUBLIC "${CMAKE_SOURCE_DIR}/include/common" + PUBLIC "${TD_SOURCE_DIR}/include/common" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" IF(${TD_WINDOWS}) - PRIVATE "${CMAKE_SOURCE_DIR}/contrib/pthread-win32" - PRIVATE "${CMAKE_SOURCE_DIR}/contrib/gnuregex" + PRIVATE "${TD_SOURCE_DIR}/contrib/pthread-win32" + PRIVATE "${TD_SOURCE_DIR}/contrib/gnuregex" ENDIF () ) target_link_libraries( diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index b351536839673021d4faffffd09695e2cbf69d2f..0bc1fa09f519ea49af319a8ab4a80afe5966766c 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -173,7 +173,7 @@ uint32_t tsMaxRange = 500; // max range uint32_t tsCurRange = 100; // range char tsCompressor[32] = "ZSTD_COMPRESSOR"; // ZSTD_COMPRESSOR or GZIP_COMPRESSOR -static void taosAddDataDir(int32_t index, char *v1, int32_t level, int32_t primary) { +void taosAddDataDir(int32_t index, char *v1, int32_t level, int32_t primary) { tstrncpy(tsDiskCfg[index].dir, v1, TSDB_FILENAME_LEN); tsDiskCfg[index].level = level; tsDiskCfg[index].primary = primary; diff --git a/source/common/test/CMakeLists.txt b/source/common/test/CMakeLists.txt index 58dde913f0814750c08cccadaaeead2ed0c0d207..a0406e099c51ac120608712de3a25f39d11395f4 100644 --- a/source/common/test/CMakeLists.txt +++ b/source/common/test/CMakeLists.txt @@ -13,8 +13,8 @@ TARGET_LINK_LIBRARIES( TARGET_INCLUDE_DIRECTORIES( commonTest - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/common/" - PRIVATE "${CMAKE_SOURCE_DIR}/source/libs/common/inc" + PUBLIC "${TD_SOURCE_DIR}/include/libs/common/" + PRIVATE "${TD_SOURCE_DIR}/source/libs/common/inc" ) # tmsg test @@ -24,5 +24,5 @@ TARGET_INCLUDE_DIRECTORIES( # "tmsgTest.cpp" # "../src/tmsg.c" # ) -# target_include_directories(tmsgTest PUBLIC "${CMAKE_SOURCE_DIR}/include/common/") +# target_include_directories(tmsgTest PUBLIC "${TD_SOURCE_DIR}/include/common/") # target_link_libraries(tmsgTest PUBLIC os util gtest gtest_main) \ No newline at end of file diff --git a/source/dnode/bnode/CMakeLists.txt b/source/dnode/bnode/CMakeLists.txt index f51969f6bf23b9b4951d3d0dfbf5cc93e5ce18bd..77f4d15ad2b2936ea3852e038efc1101fd74619d 100644 --- a/source/dnode/bnode/CMakeLists.txt +++ b/source/dnode/bnode/CMakeLists.txt @@ -2,7 +2,7 @@ aux_source_directory(src BNODE_SRC) add_library(bnode STATIC ${BNODE_SRC}) target_include_directories( bnode - PUBLIC "${CMAKE_SOURCE_DIR}/include/dnode/bnode" + PUBLIC "${TD_SOURCE_DIR}/include/dnode/bnode" private "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) target_link_libraries( diff --git a/source/dnode/mgmt/CMakeLists.txt b/source/dnode/mgmt/CMakeLists.txt index 0c9a3733a28a9e825208181cc90e3e87244abe12..f4987734628d7947724d67bdd0746927dc80c8bf 100644 --- a/source/dnode/mgmt/CMakeLists.txt +++ b/source/dnode/mgmt/CMakeLists.txt @@ -11,7 +11,7 @@ target_link_libraries( ) target_include_directories( dnode - PUBLIC "${CMAKE_SOURCE_DIR}/include/dnode/mgmt" + PUBLIC "${TD_SOURCE_DIR}/include/dnode/mgmt" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) diff --git a/source/dnode/mnode/impl/CMakeLists.txt b/source/dnode/mnode/impl/CMakeLists.txt index e91c851be7de7fff34e8853b0be5a38896a1a553..341dbf6135ed82caec7230268d124b0dc12020c7 100644 --- a/source/dnode/mnode/impl/CMakeLists.txt +++ b/source/dnode/mnode/impl/CMakeLists.txt @@ -2,7 +2,7 @@ aux_source_directory(src MNODE_SRC) add_library(mnode STATIC ${MNODE_SRC}) target_include_directories( mnode - PUBLIC "${CMAKE_SOURCE_DIR}/include/dnode/mnode" + PUBLIC "${TD_SOURCE_DIR}/include/dnode/mnode" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) target_link_libraries( diff --git a/source/dnode/mnode/sdb/CMakeLists.txt b/source/dnode/mnode/sdb/CMakeLists.txt index 168d5063c2ace0c5cf3c675f78347053abcb482a..823bcdeacad3bffa2cc48f44377f707a6d747e21 100644 --- a/source/dnode/mnode/sdb/CMakeLists.txt +++ b/source/dnode/mnode/sdb/CMakeLists.txt @@ -2,7 +2,7 @@ aux_source_directory(src MNODE_SRC) add_library(sdb STATIC ${MNODE_SRC}) target_include_directories( sdb - PUBLIC "${CMAKE_SOURCE_DIR}/include/dnode/mnode/sdb" + PUBLIC "${TD_SOURCE_DIR}/include/dnode/mnode/sdb" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) target_link_libraries( diff --git a/source/dnode/qnode/CMakeLists.txt b/source/dnode/qnode/CMakeLists.txt index 32e3e85d90c35d88a6832bb86474c509ad883fad..5426cd55d3c1183f86e057baf205e199d6307fea 100644 --- a/source/dnode/qnode/CMakeLists.txt +++ b/source/dnode/qnode/CMakeLists.txt @@ -2,7 +2,7 @@ aux_source_directory(src QNODE_SRC) add_library(qnode STATIC ${QNODE_SRC}) target_include_directories( qnode - PUBLIC "${CMAKE_SOURCE_DIR}/include/dnode/qnode" + PUBLIC "${TD_SOURCE_DIR}/include/dnode/qnode" private "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) target_link_libraries( diff --git a/source/dnode/snode/CMakeLists.txt b/source/dnode/snode/CMakeLists.txt index f177bda47aa12a6f7899a1fda8b09a56bf3046d5..6f1e7f9593a369afc0f3626514853873012da75f 100644 --- a/source/dnode/snode/CMakeLists.txt +++ b/source/dnode/snode/CMakeLists.txt @@ -2,7 +2,7 @@ aux_source_directory(src SNODE_SRC) add_library(snode STATIC ${SNODE_SRC}) target_include_directories( snode - PUBLIC "${CMAKE_SOURCE_DIR}/include/dnode/snode" + PUBLIC "${TD_SOURCE_DIR}/include/dnode/snode" private "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) target_link_libraries( diff --git a/source/dnode/vnode/test/CMakeLists.txt b/source/dnode/vnode/test/CMakeLists.txt index 59f459462f97f423c2dbdbb7917dbcab1ad97dc0..724eabc7515ea17a00459bd680cfa1c0b51fb75f 100644 --- a/source/dnode/vnode/test/CMakeLists.txt +++ b/source/dnode/vnode/test/CMakeLists.txt @@ -11,7 +11,7 @@ AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} SOURCE_LIST) # ) # target_include_directories(tqTest # PUBLIC -# "${CMAKE_SOURCE_DIR}/include/server/vnode/tq" +# "${TD_SOURCE_DIR}/include/server/vnode/tq" # "${CMAKE_CURRENT_SOURCE_DIR}/../inc" # ) @@ -33,7 +33,7 @@ AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} SOURCE_LIST) # TARGET_INCLUDE_DIRECTORIES( # tsdbSmaTest -# PUBLIC "${CMAKE_SOURCE_DIR}/include/common" +# PUBLIC "${TD_SOURCE_DIR}/include/common" # PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../src/inc" # PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../inc" # ) \ No newline at end of file diff --git a/source/libs/cache/CMakeLists.txt b/source/libs/cache/CMakeLists.txt index c99b5602ad707695839cf8de24569445b937e65d..dc631e5bfd4126fe2edbc057668430043a43f31c 100644 --- a/source/libs/cache/CMakeLists.txt +++ b/source/libs/cache/CMakeLists.txt @@ -2,6 +2,6 @@ aux_source_directory(src CACHE_SRC) add_library(cache STATIC ${CACHE_SRC}) target_include_directories( cache - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/cache" + PUBLIC "${TD_SOURCE_DIR}/include/libs/cache" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) \ No newline at end of file diff --git a/source/libs/catalog/CMakeLists.txt b/source/libs/catalog/CMakeLists.txt index 09cd252a895ca3b5b82870c8be6cdfb2e77b79f5..632034d6b60ef0454ae53ba799534934608b9b07 100644 --- a/source/libs/catalog/CMakeLists.txt +++ b/source/libs/catalog/CMakeLists.txt @@ -2,7 +2,7 @@ aux_source_directory(src CATALOG_SRC) add_library(catalog STATIC ${CATALOG_SRC}) target_include_directories( catalog - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/catalog" + PUBLIC "${TD_SOURCE_DIR}/include/libs/catalog" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) diff --git a/source/libs/catalog/test/CMakeLists.txt b/source/libs/catalog/test/CMakeLists.txt index bfab744fa7c1a7d180bc247322a8cbe412268fae..3ffb420b4b9d58fe4b379bb96a2723f689b9b670 100644 --- a/source/libs/catalog/test/CMakeLists.txt +++ b/source/libs/catalog/test/CMakeLists.txt @@ -13,8 +13,8 @@ TARGET_LINK_LIBRARIES( TARGET_INCLUDE_DIRECTORIES( catalogTest - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/catalog/" - PRIVATE "${CMAKE_SOURCE_DIR}/source/libs/catalog/inc" + PUBLIC "${TD_SOURCE_DIR}/include/libs/catalog/" + PRIVATE "${TD_SOURCE_DIR}/source/libs/catalog/inc" ) # add_test( diff --git a/source/libs/command/CMakeLists.txt b/source/libs/command/CMakeLists.txt index db3766d1452317b7419d962f6fe3e2bdfd614ff5..51118f4a34be578a62ae9ec4de0f02cb7fbabb6b 100644 --- a/source/libs/command/CMakeLists.txt +++ b/source/libs/command/CMakeLists.txt @@ -2,7 +2,7 @@ aux_source_directory(src COMMAND_SRC) add_library(command STATIC ${COMMAND_SRC}) target_include_directories( command - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/command" + PUBLIC "${TD_SOURCE_DIR}/include/libs/command" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) diff --git a/source/libs/command/test/CMakeLists.txt b/source/libs/command/test/CMakeLists.txt index 6d2335d2e36239d31c7764171d66cb84ad3b6a02..8eaa5eea68ce5347d35ea292720bc83a51bb3765 100644 --- a/source/libs/command/test/CMakeLists.txt +++ b/source/libs/command/test/CMakeLists.txt @@ -8,8 +8,8 @@ ADD_EXECUTABLE(commandTest ${SOURCE_LIST}) TARGET_INCLUDE_DIRECTORIES( commandTest - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/command/" - PRIVATE "${CMAKE_SOURCE_DIR}/source/libs/command/inc" + PUBLIC "${TD_SOURCE_DIR}/include/libs/command/" + PRIVATE "${TD_SOURCE_DIR}/source/libs/command/inc" ) TARGET_LINK_LIBRARIES( diff --git a/source/libs/executor/CMakeLists.txt b/source/libs/executor/CMakeLists.txt index f947acf822b1e435368a4c7670fc9691b27d6f5e..3dfef9b59f8050c4a41173d1e3f4d3298ddecb40 100644 --- a/source/libs/executor/CMakeLists.txt +++ b/source/libs/executor/CMakeLists.txt @@ -4,7 +4,7 @@ aux_source_directory(src EXECUTOR_SRC) add_library(executor STATIC ${EXECUTOR_SRC}) #set_target_properties(executor PROPERTIES # IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/libexecutor.a" -# INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/include/libs/executor" +# INTERFACE_INCLUDE_DIRECTORIES "${TD_SOURCE_DIR}/include/libs/executor" # ) target_link_libraries(executor @@ -13,7 +13,7 @@ target_link_libraries(executor target_include_directories( executor - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/executor" + PUBLIC "${TD_SOURCE_DIR}/include/libs/executor" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) diff --git a/source/libs/executor/test/CMakeLists.txt b/source/libs/executor/test/CMakeLists.txt index c24993eb89fe0faf7248080830e2fe72cc4d12c4..b07ff89d903fe54a337e75c511a11e5a06c8fcf9 100644 --- a/source/libs/executor/test/CMakeLists.txt +++ b/source/libs/executor/test/CMakeLists.txt @@ -13,6 +13,6 @@ TARGET_LINK_LIBRARIES( TARGET_INCLUDE_DIRECTORIES( executorTest - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/executor/" - PRIVATE "${CMAKE_SOURCE_DIR}/source/libs/executor/inc" + PUBLIC "${TD_SOURCE_DIR}/include/libs/executor/" + PRIVATE "${TD_SOURCE_DIR}/source/libs/executor/inc" ) diff --git a/source/libs/function/CMakeLists.txt b/source/libs/function/CMakeLists.txt index e1c7626f014b07b49f20d7b6150048793798da05..aa909361ea091da6c576ba2b46309ea1bb249286 100644 --- a/source/libs/function/CMakeLists.txt +++ b/source/libs/function/CMakeLists.txt @@ -4,8 +4,8 @@ add_library(function STATIC ${FUNCTION_SRC}) target_include_directories( function PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/function" - "${CMAKE_SOURCE_DIR}/contrib/libuv/include" + "${TD_SOURCE_DIR}/include/libs/function" + "${TD_SOURCE_DIR}/contrib/libuv/include" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) @@ -19,9 +19,9 @@ add_executable(runUdf test/runUdf.c) target_include_directories( runUdf PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/function" - "${CMAKE_SOURCE_DIR}/contrib/libuv/include" - "${CMAKE_SOURCE_DIR}/include/os" + "${TD_SOURCE_DIR}/include/libs/function" + "${TD_SOURCE_DIR}/contrib/libuv/include" + "${TD_SOURCE_DIR}/include/os" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) target_link_libraries( @@ -34,8 +34,8 @@ add_library(udf1 MODULE test/udf1.c) target_include_directories( udf1 PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/function" - "${CMAKE_SOURCE_DIR}/include/os" + "${TD_SOURCE_DIR}/include/libs/function" + "${TD_SOURCE_DIR}/include/os" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) @@ -44,8 +44,8 @@ add_executable(udfd src/udfd.c) target_include_directories( udfd PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/function" - "${CMAKE_SOURCE_DIR}/contrib/libuv/include" + "${TD_SOURCE_DIR}/include/libs/function" + "${TD_SOURCE_DIR}/contrib/libuv/include" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) diff --git a/source/libs/index/CMakeLists.txt b/source/libs/index/CMakeLists.txt index 047fc555a0c9f6b4549b2a0009b919a738fbf443..7dc66e47898eed6e58288d775a0d4c78f79dc4b0 100644 --- a/source/libs/index/CMakeLists.txt +++ b/source/libs/index/CMakeLists.txt @@ -2,8 +2,8 @@ aux_source_directory(src INDEX_SRC) add_library(index STATIC ${INDEX_SRC}) target_include_directories( index - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/index" - PUBLIC "${CMAKE_SOURCE_DIR}/include/os" + PUBLIC "${TD_SOURCE_DIR}/include/libs/index" + PUBLIC "${TD_SOURCE_DIR}/include/os" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) @@ -17,9 +17,9 @@ target_link_libraries( if (${BUILD_WITH_LUCENE}) target_include_directories( index - PUBLIC "${CMAKE_SOURCE_DIR}/deps/lucene/include" + PUBLIC "${TD_SOURCE_DIR}/deps/lucene/include" ) - LINK_DIRECTORIES("${CMAKE_SOURCE_DIR}/deps/lucene/debug/src/core") + LINK_DIRECTORIES("${TD_SOURCE_DIR}/deps/lucene/debug/src/core") target_link_libraries( index PUBLIC lucene++ diff --git a/source/libs/index/test/CMakeLists.txt b/source/libs/index/test/CMakeLists.txt index 1ebf85368b36018a24226d93a3fb66a7dd3fb19e..a5c02fb9dcf28d6a6c20b951cd23ecff0b2560e2 100644 --- a/source/libs/index/test/CMakeLists.txt +++ b/source/libs/index/test/CMakeLists.txt @@ -28,30 +28,30 @@ target_sources(jsonUT ) target_include_directories ( indexTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/index" + "${TD_SOURCE_DIR}/include/libs/index" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories ( fstTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/index" + "${TD_SOURCE_DIR}/include/libs/index" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories ( fstUT PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/index" + "${TD_SOURCE_DIR}/include/libs/index" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories ( UtilUT PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/index" + "${TD_SOURCE_DIR}/include/libs/index" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories (jsonUT PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/index" + "${TD_SOURCE_DIR}/include/libs/index" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_link_libraries (indexTest diff --git a/source/libs/monitor/CMakeLists.txt b/source/libs/monitor/CMakeLists.txt index 58f1c08039731f083bf366165b99a56401100e5e..30dce7aaefda3e5a51a82f657b981d8da88ded02 100644 --- a/source/libs/monitor/CMakeLists.txt +++ b/source/libs/monitor/CMakeLists.txt @@ -2,7 +2,7 @@ aux_source_directory(src MONITOR_SRC) add_library(monitor STATIC ${MONITOR_SRC}) target_include_directories( monitor - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/monitor" + PUBLIC "${TD_SOURCE_DIR}/include/libs/monitor" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) diff --git a/source/libs/nodes/CMakeLists.txt b/source/libs/nodes/CMakeLists.txt index e20cdc39ba59f5264aa1be40c01d9a8a4fe11b15..b8fdb32987c4fe5184d6a62acb3eb3934f799a09 100644 --- a/source/libs/nodes/CMakeLists.txt +++ b/source/libs/nodes/CMakeLists.txt @@ -2,7 +2,7 @@ aux_source_directory(src NODES_SRC) add_library(nodes STATIC ${NODES_SRC}) target_include_directories( nodes - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/nodes" + PUBLIC "${TD_SOURCE_DIR}/include/libs/nodes" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) target_link_libraries( diff --git a/source/libs/nodes/test/CMakeLists.txt b/source/libs/nodes/test/CMakeLists.txt index 80725a79fbc8cd80d75ca9198752967eb1af7dec..2be8e78d066d20372e2f0d211240940a16fda2ef 100644 --- a/source/libs/nodes/test/CMakeLists.txt +++ b/source/libs/nodes/test/CMakeLists.txt @@ -9,8 +9,8 @@ ADD_EXECUTABLE(nodesTest ${SOURCE_LIST}) TARGET_INCLUDE_DIRECTORIES( nodesTest - PUBLIC "${CMAKE_SOURCE_DIR}/include/nodes/" - PRIVATE "${CMAKE_SOURCE_DIR}/source/nodes/inc" + PUBLIC "${TD_SOURCE_DIR}/include/nodes/" + PRIVATE "${TD_SOURCE_DIR}/source/nodes/inc" ) TARGET_LINK_LIBRARIES( diff --git a/source/libs/parser/CMakeLists.txt b/source/libs/parser/CMakeLists.txt index c3157480a99f1016b70a65bc8a4520f56e5cdc1e..860250df85b928bac1111c961033928a16506b8d 100644 --- a/source/libs/parser/CMakeLists.txt +++ b/source/libs/parser/CMakeLists.txt @@ -2,7 +2,7 @@ aux_source_directory(src PARSER_SRC) add_library(parser STATIC ${PARSER_SRC}) target_include_directories( parser - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/parser" + PUBLIC "${TD_SOURCE_DIR}/include/libs/parser" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) diff --git a/source/libs/parser/test/CMakeLists.txt b/source/libs/parser/test/CMakeLists.txt index 84164c8c7649af10451f5c2a27f323cb32c8096f..869232002aa7bf2309794d94703097b4b1a1215b 100644 --- a/source/libs/parser/test/CMakeLists.txt +++ b/source/libs/parser/test/CMakeLists.txt @@ -9,8 +9,8 @@ ADD_EXECUTABLE(parserTest ${SOURCE_LIST}) TARGET_INCLUDE_DIRECTORIES( parserTest - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/parser/" - PRIVATE "${CMAKE_SOURCE_DIR}/source/libs/parser/inc" + PUBLIC "${TD_SOURCE_DIR}/include/libs/parser/" + PRIVATE "${TD_SOURCE_DIR}/source/libs/parser/inc" ) TARGET_LINK_LIBRARIES( diff --git a/source/libs/planner/CMakeLists.txt b/source/libs/planner/CMakeLists.txt index db5d31f22b9b20449cf3d4c729e89265e1eba906..a095a6205f45e9ab0d3a90b1d814cf0b43dec2e1 100644 --- a/source/libs/planner/CMakeLists.txt +++ b/source/libs/planner/CMakeLists.txt @@ -2,7 +2,7 @@ aux_source_directory(src PLANNER_SRC) add_library(planner STATIC ${PLANNER_SRC}) target_include_directories( planner - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/planner" + PUBLIC "${TD_SOURCE_DIR}/include/libs/planner" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) diff --git a/source/libs/planner/test/CMakeLists.txt b/source/libs/planner/test/CMakeLists.txt index cd60b503b990e92973d1b5c99c83eeab3b312801..e068cd8698d8ddf5b7211fa984bea5dee3a66c7b 100644 --- a/source/libs/planner/test/CMakeLists.txt +++ b/source/libs/planner/test/CMakeLists.txt @@ -18,7 +18,7 @@ TARGET_LINK_LIBRARIES( TARGET_INCLUDE_DIRECTORIES( plannerTest - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/planner/" - PRIVATE "${CMAKE_SOURCE_DIR}/source/libs/planner/inc" - PRIVATE "${CMAKE_SOURCE_DIR}/source/libs/parser/test" + PUBLIC "${TD_SOURCE_DIR}/include/libs/planner/" + PRIVATE "${TD_SOURCE_DIR}/source/libs/planner/inc" + PRIVATE "${TD_SOURCE_DIR}/source/libs/parser/test" ) diff --git a/source/libs/qcom/CMakeLists.txt b/source/libs/qcom/CMakeLists.txt index d50047e59248079dd780bae5e2f85c94b8b743a5..6e7b5cb610b64f6b045684b6d4c86a7754056a59 100644 --- a/source/libs/qcom/CMakeLists.txt +++ b/source/libs/qcom/CMakeLists.txt @@ -2,7 +2,7 @@ aux_source_directory(src QUERY_SRC) add_library(qcom STATIC ${QUERY_SRC}) target_include_directories( qcom - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/qcom" + PUBLIC "${TD_SOURCE_DIR}/include/libs/qcom" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) diff --git a/source/libs/qcom/test/CMakeLists.txt b/source/libs/qcom/test/CMakeLists.txt index e3a0e11a3231b4e3cad24c07c58294bd6069565a..8ad38a9f50302b39c515689bad9c8cf93e05964a 100644 --- a/source/libs/qcom/test/CMakeLists.txt +++ b/source/libs/qcom/test/CMakeLists.txt @@ -9,8 +9,8 @@ ADD_EXECUTABLE(queryUtilTest ${SOURCE_LIST}) TARGET_INCLUDE_DIRECTORIES( queryUtilTest - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/qcom/" - PRIVATE "${CMAKE_SOURCE_DIR}/source/libs/qcom/inc" + PUBLIC "${TD_SOURCE_DIR}/include/libs/qcom/" + PRIVATE "${TD_SOURCE_DIR}/source/libs/qcom/inc" ) TARGET_LINK_LIBRARIES( diff --git a/source/libs/qworker/CMakeLists.txt b/source/libs/qworker/CMakeLists.txt index 89700e89399221836496666083ea79447af88657..306753808bcca232f7c8b0f824f98ba0351a2b60 100644 --- a/source/libs/qworker/CMakeLists.txt +++ b/source/libs/qworker/CMakeLists.txt @@ -3,7 +3,7 @@ aux_source_directory(src QWORKER_SRC) add_library(qworker STATIC ${QWORKER_SRC}) target_include_directories( qworker - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/qworker" + PUBLIC "${TD_SOURCE_DIR}/include/libs/qworker" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) diff --git a/source/libs/qworker/test/CMakeLists.txt b/source/libs/qworker/test/CMakeLists.txt index 6de71a4530a4afbb36bf79cbaa854476cd3f3c0b..e7cc8b7c836187978da78531e866be864ed95869 100644 --- a/source/libs/qworker/test/CMakeLists.txt +++ b/source/libs/qworker/test/CMakeLists.txt @@ -13,6 +13,6 @@ TARGET_LINK_LIBRARIES( TARGET_INCLUDE_DIRECTORIES( qworkerTest - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/qworker/" - PRIVATE "${CMAKE_SOURCE_DIR}/source/libs/qworker/inc" + PUBLIC "${TD_SOURCE_DIR}/include/libs/qworker/" + PRIVATE "${TD_SOURCE_DIR}/source/libs/qworker/inc" ) diff --git a/source/libs/scalar/CMakeLists.txt b/source/libs/scalar/CMakeLists.txt index d2d02bc0dcbf85983b10e9daf7f01dc5fa1bc49d..02d530533ccdb551c6c95d13dfa9ba34a41940b4 100644 --- a/source/libs/scalar/CMakeLists.txt +++ b/source/libs/scalar/CMakeLists.txt @@ -3,7 +3,7 @@ aux_source_directory(src SCALAR_SRC) add_library(scalar STATIC ${SCALAR_SRC}) target_include_directories( scalar - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/scalar" + PUBLIC "${TD_SOURCE_DIR}/include/libs/scalar" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) diff --git a/source/libs/scalar/test/filter/CMakeLists.txt b/source/libs/scalar/test/filter/CMakeLists.txt index b738285dedcea2c2a01d406ed76facc987e3162e..8e3aeb6f9dcb71b9764fda0b9378e9ef2ef4ed20 100644 --- a/source/libs/scalar/test/filter/CMakeLists.txt +++ b/source/libs/scalar/test/filter/CMakeLists.txt @@ -13,6 +13,6 @@ TARGET_LINK_LIBRARIES( TARGET_INCLUDE_DIRECTORIES( filterTest - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/scalar/" - PRIVATE "${CMAKE_SOURCE_DIR}/source/libs/scalar/inc" + PUBLIC "${TD_SOURCE_DIR}/include/libs/scalar/" + PRIVATE "${TD_SOURCE_DIR}/source/libs/scalar/inc" ) diff --git a/source/libs/scalar/test/scalar/CMakeLists.txt b/source/libs/scalar/test/scalar/CMakeLists.txt index 9dfbf3b5e882277e5568dbd7d0360964d75122ad..6cbac1e25d7e5f7be1931129a82c143047555029 100644 --- a/source/libs/scalar/test/scalar/CMakeLists.txt +++ b/source/libs/scalar/test/scalar/CMakeLists.txt @@ -13,6 +13,6 @@ TARGET_LINK_LIBRARIES( TARGET_INCLUDE_DIRECTORIES( scalarTest - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/scalar/" - PRIVATE "${CMAKE_SOURCE_DIR}/source/libs/scalar/inc" + PUBLIC "${TD_SOURCE_DIR}/include/libs/scalar/" + PRIVATE "${TD_SOURCE_DIR}/source/libs/scalar/inc" ) diff --git a/source/libs/scheduler/CMakeLists.txt b/source/libs/scheduler/CMakeLists.txt index 1a62c7d89d4624c70210fdc68971313ad0104d02..88180391ddaae2b5dfd2b2f33a3bc4a34cac8e09 100644 --- a/source/libs/scheduler/CMakeLists.txt +++ b/source/libs/scheduler/CMakeLists.txt @@ -3,7 +3,7 @@ add_library(scheduler STATIC ${SCHEDULER_SRC}) target_include_directories( scheduler - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/scheduler" + PUBLIC "${TD_SOURCE_DIR}/include/libs/scheduler" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) diff --git a/source/libs/scheduler/test/CMakeLists.txt b/source/libs/scheduler/test/CMakeLists.txt index 00a6d08e5d7be527005a64f0e4111d9a3e35974d..4018f73ee288aaff9630acfb0d143b109e317a00 100644 --- a/source/libs/scheduler/test/CMakeLists.txt +++ b/source/libs/scheduler/test/CMakeLists.txt @@ -13,6 +13,6 @@ TARGET_LINK_LIBRARIES( TARGET_INCLUDE_DIRECTORIES( schedulerTest - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/scheduler/" - PRIVATE "${CMAKE_SOURCE_DIR}/source/libs/scheduler/inc" + PUBLIC "${TD_SOURCE_DIR}/include/libs/scheduler/" + PRIVATE "${TD_SOURCE_DIR}/source/libs/scheduler/inc" ) diff --git a/source/libs/stream/CMakeLists.txt b/source/libs/stream/CMakeLists.txt index 572c70d31ba6140b4c368d3570e31436259ed862..3bab354c220f0ae82a56d5681bd10bc7ea91685e 100644 --- a/source/libs/stream/CMakeLists.txt +++ b/source/libs/stream/CMakeLists.txt @@ -2,7 +2,7 @@ aux_source_directory(src STREAM_SRC) add_library(stream STATIC ${STREAM_SRC}) target_include_directories( stream - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/stream" + PUBLIC "${TD_SOURCE_DIR}/include/libs/stream" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) diff --git a/source/libs/sync/CMakeLists.txt b/source/libs/sync/CMakeLists.txt index cb196acc02e49c7e3aa85a1d522515d69ebf33ef..551849c6f29f3def8b275877aba28f7048ea1793 100644 --- a/source/libs/sync/CMakeLists.txt +++ b/source/libs/sync/CMakeLists.txt @@ -11,7 +11,7 @@ target_link_libraries( target_include_directories( sync - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/sync" + PUBLIC "${TD_SOURCE_DIR}/include/libs/sync" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) diff --git a/source/libs/sync/test/CMakeLists.txt b/source/libs/sync/test/CMakeLists.txt index 7341565b1d526239e2b15aae2d463b294991c3da..58b01e4ca231fb07ed47c962b471fe476463d6a4 100644 --- a/source/libs/sync/test/CMakeLists.txt +++ b/source/libs/sync/test/CMakeLists.txt @@ -204,202 +204,202 @@ target_sources(syncLogStoreCheck target_include_directories(syncTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncEnvTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncPingTimerTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncIOTickQTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncIOTickPingTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncIOSendMsgTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncIOClientTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncIOServerTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncRaftStoreTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncEnqTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncIndexTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncInitTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncUtilTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncVotesGrantedTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncVotesRespondTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncIndexMgrTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncLogStoreTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncEntryTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncRequestVoteTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncRequestVoteReplyTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncAppendEntriesTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncAppendEntriesReplyTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncClientRequestTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncTimeoutTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncPingTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncPingReplyTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncRpcMsgTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncPingTimerTest2 PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncPingSelfTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncElectTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncElectTest2 PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncElectTest3 PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncEncodeTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncWriteTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncReplicateTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncReplicateTest2 PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncReplicateTest3 PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncReplicateLoadTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncRefTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(syncLogStoreCheck PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/sync" + "${TD_SOURCE_DIR}/include/libs/sync" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) diff --git a/source/libs/tfs/CMakeLists.txt b/source/libs/tfs/CMakeLists.txt index 97e02fc8a9e2ae53aa3fb3bfd48f9a7789ba8dec..ef1afa01a11d1aae5155774ab4e855eedd84d465 100644 --- a/source/libs/tfs/CMakeLists.txt +++ b/source/libs/tfs/CMakeLists.txt @@ -2,7 +2,7 @@ aux_source_directory(src TFS_SRC) add_library(tfs STATIC ${TFS_SRC}) target_include_directories( tfs - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/tfs" + PUBLIC "${TD_SOURCE_DIR}/include/libs/tfs" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) diff --git a/source/libs/transport/CMakeLists.txt b/source/libs/transport/CMakeLists.txt index 20dd3f7ad2865305c3ad663fbc29e948f9624895..62eb1a985bbb5eeddbb415b8e58e60041e95d968 100644 --- a/source/libs/transport/CMakeLists.txt +++ b/source/libs/transport/CMakeLists.txt @@ -2,7 +2,7 @@ aux_source_directory(src TRANSPORT_SRC) add_library(transport STATIC ${TRANSPORT_SRC}) target_include_directories( transport - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/transport" + PUBLIC "${TD_SOURCE_DIR}/include/libs/transport" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) @@ -18,7 +18,7 @@ if (${BUILD_WITH_UV_TRANS}) if (${BUILD_WITH_UV}) target_include_directories( transport - PUBLIC "${CMAKE_SOURCE_DIR}/contrib/libuv/include" + PUBLIC "${TD_SOURCE_DIR}/contrib/libuv/include" ) target_link_libraries( diff --git a/source/libs/transport/test/CMakeLists.txt b/source/libs/transport/test/CMakeLists.txt index 1245121d94376b2b5d677a7e918d2e20746449cf..02ada328fc702a2ae36a450e623159b39ceb786a 100644 --- a/source/libs/transport/test/CMakeLists.txt +++ b/source/libs/transport/test/CMakeLists.txt @@ -33,7 +33,7 @@ target_sources(pushServer target_include_directories(transportTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/transport" + "${TD_SOURCE_DIR}/include/libs/transport" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) @@ -54,7 +54,7 @@ target_link_libraries (transUT target_include_directories(client PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/transport" + "${TD_SOURCE_DIR}/include/libs/transport" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) @@ -67,13 +67,13 @@ target_link_libraries (client ) target_include_directories(server PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/transport" + "${TD_SOURCE_DIR}/include/libs/transport" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_include_directories(transUT PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/transport" + "${TD_SOURCE_DIR}/include/libs/transport" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) @@ -86,7 +86,7 @@ target_link_libraries (server ) target_include_directories(syncClient PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/transport" + "${TD_SOURCE_DIR}/include/libs/transport" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_link_libraries (syncClient @@ -99,7 +99,7 @@ target_link_libraries (syncClient target_include_directories(pushServer PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/transport" + "${TD_SOURCE_DIR}/include/libs/transport" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) target_link_libraries (pushServer diff --git a/source/libs/wal/CMakeLists.txt b/source/libs/wal/CMakeLists.txt index 4cf7cff8186bf3625ad932223d14f5e36f97bed8..d2ed4f1d16515732a80a38f107d6f17ed3541070 100644 --- a/source/libs/wal/CMakeLists.txt +++ b/source/libs/wal/CMakeLists.txt @@ -2,7 +2,7 @@ aux_source_directory(src WAL_SRC) add_library(wal STATIC ${WAL_SRC}) target_include_directories( wal - PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/wal" + PUBLIC "${TD_SOURCE_DIR}/include/libs/wal" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) diff --git a/source/libs/wal/test/CMakeLists.txt b/source/libs/wal/test/CMakeLists.txt index 1c0a3a162a3bd40abda62f20fc0a4ee6ccda1087..84c6ed0e6828ccd374b94ad6e1635685c70cad69 100644 --- a/source/libs/wal/test/CMakeLists.txt +++ b/source/libs/wal/test/CMakeLists.txt @@ -5,7 +5,7 @@ target_sources(walTest ) target_include_directories(walTest PUBLIC - "${CMAKE_SOURCE_DIR}/include/libs/wal" + "${TD_SOURCE_DIR}/include/libs/wal" "${CMAKE_CURRENT_SOURCE_DIR}/../inc" ) diff --git a/source/os/CMakeLists.txt b/source/os/CMakeLists.txt index c467ab5fa39dd54659dc320f3a518c1ee9588751..261ec312ad968988106c782c290055c8f6327d81 100644 --- a/source/os/CMakeLists.txt +++ b/source/os/CMakeLists.txt @@ -2,11 +2,11 @@ aux_source_directory(src OS_SRC) add_library(os STATIC ${OS_SRC}) target_include_directories( os - PUBLIC "${CMAKE_SOURCE_DIR}/include/os" - PUBLIC "${CMAKE_SOURCE_DIR}/include" - PUBLIC "${CMAKE_SOURCE_DIR}/include/util" - PUBLIC "${CMAKE_SOURCE_DIR}/contrib/pthread" - PUBLIC "${CMAKE_SOURCE_DIR}/contrib/gnuregex" + PUBLIC "${TD_SOURCE_DIR}/include/os" + PUBLIC "${TD_SOURCE_DIR}/include" + PUBLIC "${TD_SOURCE_DIR}/include/util" + PUBLIC "${TD_SOURCE_DIR}/contrib/pthread" + PUBLIC "${TD_SOURCE_DIR}/contrib/gnuregex" ) # iconv find_path(IconvApiIncludes iconv.h PATHS) diff --git a/source/util/CMakeLists.txt b/source/util/CMakeLists.txt index 7a47639e75f2e18e6ed47a19066c0a69ea336503..8609c6eb217ef6a87046542769cd269450466bc6 100644 --- a/source/util/CMakeLists.txt +++ b/source/util/CMakeLists.txt @@ -3,7 +3,7 @@ aux_source_directory(src UTIL_SRC) add_library(util STATIC ${UTIL_SRC}) target_include_directories( util - PUBLIC "${CMAKE_SOURCE_DIR}/include/util" + PUBLIC "${TD_SOURCE_DIR}/include/util" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) target_link_libraries( diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index f064833691a36e9ef3512d1648ea9a5934ab78e9..afd3b36f2d071537e1ffdb74fd670dc7516a2208 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,10 +1,10 @@ IF (TD_TAOS_TOOLS) - INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/tools/taos_tools/deps/avro/lang/c/src) - INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include/client) - INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include/common) - INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include/util) - INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include/os) - INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include/libs/transport) + INCLUDE_DIRECTORIES(${TD_SOURCE_DIR}/tools/taos_tools/deps/avro/lang/c/src) + INCLUDE_DIRECTORIES(${TD_SOURCE_DIR}/include/client) + INCLUDE_DIRECTORIES(${TD_SOURCE_DIR}/include/common) + INCLUDE_DIRECTORIES(${TD_SOURCE_DIR}/include/util) + INCLUDE_DIRECTORIES(${TD_SOURCE_DIR}/include/os) + INCLUDE_DIRECTORIES(${TD_SOURCE_DIR}/include/libs/transport) ADD_SUBDIRECTORY(taos-tools) ENDIF ()