diff --git a/source/common/CMakeLists.txt b/source/common/CMakeLists.txt index f01c8dcbb9..eb3dd95e95 100644 --- a/source/common/CMakeLists.txt +++ b/source/common/CMakeLists.txt @@ -47,10 +47,6 @@ target_link_libraries( INTERFACE api ) -if(${BUILD_WITH_ANALYSIS}) - add_definitions(-DUSE_ANAL) -endif() - if(${BUILD_S3}) if(${BUILD_WITH_S3}) diff --git a/source/dnode/mnode/impl/CMakeLists.txt b/source/dnode/mnode/impl/CMakeLists.txt index ceaf086dc1..1a74b6fa9f 100644 --- a/source/dnode/mnode/impl/CMakeLists.txt +++ b/source/dnode/mnode/impl/CMakeLists.txt @@ -14,6 +14,10 @@ IF (TD_ENTERPRISE) ELSEIF(${BUILD_WITH_COS}) add_definitions(-DUSE_COS) ENDIF() + + IF(${BUILD_WITH_ANALYSIS}) + add_definitions(-DUSE_ANAL) + ENDIF() ENDIF () add_library(mnode STATIC ${MNODE_SRC}) diff --git a/source/libs/executor/CMakeLists.txt b/source/libs/executor/CMakeLists.txt index 8ba5f9a866..af2c3986aa 100644 --- a/source/libs/executor/CMakeLists.txt +++ b/source/libs/executor/CMakeLists.txt @@ -5,6 +5,10 @@ if(${TD_DARWIN}) target_compile_options(executor PRIVATE -Wno-error=deprecated-non-prototype) endif(${TD_DARWIN}) +IF(${BUILD_WITH_ANALYSIS}) + add_definitions(-DUSE_ANAL) +ENDIF() + target_link_libraries(executor PRIVATE os util common function parser planner qcom scalar nodes index wal tdb geometry ) diff --git a/source/util/CMakeLists.txt b/source/util/CMakeLists.txt index f907746821..4972e9f50b 100644 --- a/source/util/CMakeLists.txt +++ b/source/util/CMakeLists.txt @@ -12,6 +12,10 @@ ELSE () MESSAGE(STATUS "enable assert core") ENDIF (${ASSERT_NOT_CORE}) +if(${BUILD_WITH_ANALYSIS}) + add_definitions(-DUSE_ANAL) +endif() + target_include_directories( util PUBLIC "${TD_SOURCE_DIR}/include/util"