From 043e28b8b6f366da555fed61db0c221d75e158ca Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Sat, 23 Oct 2021 19:23:21 +0800 Subject: [PATCH] Feature/sangshuduo/td 10469 blm3 (#8391) * [TD-10469]: use blm to replace httpd * add blm3 as submodule and modify the install script. * make http disabled by default. * use external project for go build. * make install and systemctl works. * change blm3 to official repo. * fix alert build missing sqlx package. * update README regarding golang env setup. * remove blm3. * modify script to support blm3 * udpate submodule in CI * update jenkinsfile * update blm3 with statsd port changed and config file name changed. * still use tdengine's httpd for lite version. * include blm.toml in released packages. * merge with develop branch. * update grafana plugin to support telegraf. * fix python test framework * fix blm3.toml name * comment off restful test for blm3 CI. * fix blm.toml name * comment off http related case for blm3. * fix cmake define.inc for windows build * update grafanaplugin * update blm3 * update grafana. * update grafana plugin to support statsd. * update blm3 to support lower version go. * update grafanaplugin and blm3 bugfix. * update grafana plugin, dashboard name changed. update blm3 for cinterface error code. * disable blm3 in arm32 * support blm3 --version * change cmake minimum version requirement from 2.8 to 3.0 * pull latest blm3 c67fcc11bc5e82e3d7aea8db855a8cbf8b109239 * update blm3 to 2021/10/22. * support BUILD_HTTP false. Co-authored-by: liuyq-617 --- cmake/define.inc | 24 ++++++++++++++++-------- cmake/input.inc | 4 ---- src/plugins/CMakeLists.txt | 2 +- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/cmake/define.inc b/cmake/define.inc index 10134a94d2..e0cdfd3efc 100755 --- a/cmake/define.inc +++ b/cmake/define.inc @@ -124,17 +124,25 @@ IF (TD_APLHINE) MESSAGE(STATUS "aplhine is defined") ENDIF () -IF (TD_LINUX) - IF (TD_ARM_32) - SET(TD_BUILD_HTTP TRUE) - ADD_DEFINITIONS(-DHTTP_EMBEDDED) - ELSE () - IF (TD_BUILD_HTTP) - ADD_DEFINITIONS(-DHTTP_EMBEDDED) +MESSAGE("before BUILD_HTTP: " ${BUILD_HTTP}) +IF ("${BUILD_HTTP}" STREQUAL "") + IF (TD_LINUX) + IF (TD_ARM_32) + SET(BUILD_HTTP "true") + ELSE () + SET(BUILD_HTTP "false") ENDIF () + ELSE () + SET(BUILD_HTTP "true") ENDIF () -ELSE () +ENDIF () +MESSAGE("after BUILD_HTTP: " ${BUILD_HTTP}) + +IF (${BUILD_HTTP} MATCHES "true") SET(TD_BUILD_HTTP TRUE) +ENDIF () + +IF (TD_BUILD_HTTP) ADD_DEFINITIONS(-DHTTP_EMBEDDED) ENDIF () diff --git a/cmake/input.inc b/cmake/input.inc index a6eaaa9789..5bd1a7bed6 100755 --- a/cmake/input.inc +++ b/cmake/input.inc @@ -92,10 +92,6 @@ ENDIF () SET(TD_BUILD_HTTP FALSE) -IF (${BUILD_HTTP} MATCHES "true") - SET(TD_BUILD_HTTP TRUE) -ENDIF () - SET(TD_MEMORY_SANITIZER FALSE) IF (${MEMORY_SANITIZER} MATCHES "true") SET(TD_MEMORY_SANITIZER TRUE) diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index 83e54b9796..4cf444bab2 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -32,7 +32,7 @@ ELSE () MESSAGE("") MESSAGE("${Green} use blm3 as httpd ${ColourReset}") EXECUTE_PROCESS( - COMMAND cd blm3 + COMMAND cd ${CMAKE_CURRENT_SOURCE_DIR}/blm3 ) EXECUTE_PROCESS( COMMAND git rev-parse --short HEAD -- GitLab