diff --git a/CMakeLists.txt b/CMakeLists.txt index c21399ddeafc4b215ee177ac45e6c06e9e25a81d..bc3314e8ee5442240ffc7540c397c5c05e4768da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.5) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(TDengine) SET(CMAKE_C_STANDARD 11) @@ -20,7 +20,7 @@ IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR UNIX) ENDIF () #set debug & release related options -SET(COMMON_FLAGS "-Wall -fPIC -malign-double -Wno-char-subscripts -malign-stringops -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE") +SET(COMMON_FLAGS "-std=gnu99 -Wall -fPIC -malign-double -Wno-char-subscripts -malign-stringops -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE") SET(COMMON_CXX_FLAGS "${COMMON_FLAGS} -std=c++11") SET(DEBUG_FLAGS "-O0 -DDEBUG") @@ -43,7 +43,7 @@ ENDIF () #set output directory SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/build/lib) SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/build/bin) -SET(TESTS_OUTPUT_DIR ${PROJECT_BINARY_DIR}/build/test) +SET(TESTS_OUTPUT_DIR ${PROJECT_BINARY_DIR}/test) MESSAGE(STATUS "Project binary output path: " ${PROJECT_BINARY_DIR}) MESSAGE(STATUS "Executable files output path: " ${EXECUTABLE_OUTPUT_PATH}) diff --git a/README.md b/README.md index 42e3d0710f5769f5366e803d650868933eb4dc35..dc216ea9a72445ffeb0dc7f8d18498d749898c75 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Refer to [TDengine Documentation](https://www.taosdata.com/en/documentation/) # Building At the moment, TDengine only supports building and running on Linux systems. You can choose to [install from packages](https://www.taosdata.com/en/getting-started/#Install-from-Package) or from the source code. This quick guide is for installation from the source only. -To build TDengine, use [CMake](https://cmake.org/) 3.5 or higher versions in the project directory: +To build TDengine, use [CMake](https://cmake.org/) 2.8 or higher versions in the project directory: ```cmd mkdir build && cd build diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index 235b444a98c0f7ba2f8b55eeb4048acdd0832451..bbd045000ccadbc57ee6bc5a5200231288dea68c 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.5) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(TDengine) diff --git a/deps/zlib-1.2.11/CMakeLists.txt b/deps/zlib-1.2.11/CMakeLists.txt index 704a24204589e7014a1362432eb23056e1769f26..5a0f37dd6b870761818e49349ee5da8cc0eb99e5 100644 --- a/deps/zlib-1.2.11/CMakeLists.txt +++ b/deps/zlib-1.2.11/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.5) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(TDengine) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3ed07b45ea5b957a5261ec9ed9997ed7bc35f176..7f12970bce7409e7575274230615382d67e07c7f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.5) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(TDengine) diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index 6de31a4ff5bef2947d70ee6396f6f028457fa272..fa85256460acc7b8e30ede002d8085e2ebe8ff9d 100755 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.5) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(TDengine) diff --git a/src/connector/jdbc/CMakeLists.txt b/src/connector/jdbc/CMakeLists.txt index e79584050375014253b3f17c7710d7f890bbefb9..69746c5b9829dcf2dcedce11162843978b4fbeae 100644 --- a/src/connector/jdbc/CMakeLists.txt +++ b/src/connector/jdbc/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.5) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(TDengine) diff --git a/src/kit/shell/CMakeLists.txt b/src/kit/shell/CMakeLists.txt index 7e0a5ca2e36cd5dfc50d0c2436217ec8e755e067..73714fac99f01883292c44da20166fa504ada954 100644 --- a/src/kit/shell/CMakeLists.txt +++ b/src/kit/shell/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.5) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(TDengine) diff --git a/src/kit/taosBenchmark/CMakeLists.txt b/src/kit/taosBenchmark/CMakeLists.txt index 4b6cf8c64b9653d191bc561762b2d63b294f2ebe..196dc1f314e2e5d6206162fadc7850fb4e789c61 100644 --- a/src/kit/taosBenchmark/CMakeLists.txt +++ b/src/kit/taosBenchmark/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.5) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(TDengine) diff --git a/src/kit/taosdump/CMakeLists.txt b/src/kit/taosdump/CMakeLists.txt index 1a65fd005181019b90b650f06b691f950baa0653..8882ae80528744c3315ff62b9ba1f76b92301aa5 100644 --- a/src/kit/taosdump/CMakeLists.txt +++ b/src/kit/taosdump/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.5) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(TDengine) diff --git a/src/modules/http/CMakeLists.txt b/src/modules/http/CMakeLists.txt index b21bd66bfc23221d9ae0d94d97ec2e927c01e278..58d2805e2f25d9d1d935f74606bde1398e52432e 100755 --- a/src/modules/http/CMakeLists.txt +++ b/src/modules/http/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.5) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(TDengine) diff --git a/src/modules/monitor/CMakeLists.txt b/src/modules/monitor/CMakeLists.txt index ef6657ec9541a290a6adffcb648c99f8106957c6..35d28a9fac0a27c4ff257a80285489f8ce8d068c 100755 --- a/src/modules/monitor/CMakeLists.txt +++ b/src/modules/monitor/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.5) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(TDengine) diff --git a/src/rpc/CMakeLists.txt b/src/rpc/CMakeLists.txt index bfcdced71d5e3e7d949649814b2fc17432335869..af7b2af6cf7c2222dbbf53c17dfd78a05b0196a6 100755 --- a/src/rpc/CMakeLists.txt +++ b/src/rpc/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.5) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(TDengine) diff --git a/src/sdb/CMakeLists.txt b/src/sdb/CMakeLists.txt index 26c75bb18e438b4a68ff2f0abaabbc156ff05cc4..5b9d99772016f79b631e12b31f16579fed876ab9 100755 --- a/src/sdb/CMakeLists.txt +++ b/src/sdb/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.5) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(TDengine) diff --git a/src/system/CMakeLists.txt b/src/system/CMakeLists.txt index 6a7e431978f8160ed9703eb257d7072e6e316d17..00dfd306ca354830c3678e88131951d05754e748 100755 --- a/src/system/CMakeLists.txt +++ b/src/system/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.5) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(TDengine) @@ -11,7 +11,9 @@ TARGET_LINK_LIBRARIES(taosd taos_static trpc tutil sdb monitor pthread http z) SET(PREPARE_ENV_CMD "prepare_env_cmd") SET(PREPARE_ENV_TARGET "prepare_env_target") ADD_CUSTOM_COMMAND(OUTPUT ${PREPARE_ENV_CMD} - POST_BUILD + POST_BUILD + COMMAND echo "make test directory" + DEPENDS taosd COMMAND ${CMAKE_COMMAND} -E make_directory ${TESTS_OUTPUT_DIR}/cfg/ COMMAND ${CMAKE_COMMAND} -E make_directory ${TESTS_OUTPUT_DIR}/log/ COMMAND ${CMAKE_COMMAND} -E make_directory ${TESTS_OUTPUT_DIR}/data/ diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt index a19060ee52405a98f69ac88e2c5544c69efcf7b9..dfcca250a88210f4a6ec6e2ad3a8a6595f444900 100755 --- a/src/util/CMakeLists.txt +++ b/src/util/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.5) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(TDengine)