diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index cde5d3f90e..d2092eb018 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -125,10 +125,6 @@ set(MILVUS_SOURCE_DIR ${PROJECT_SOURCE_DIR}) set(MILVUS_BINARY_DIR ${PROJECT_BINARY_DIR}) set(MILVUS_ENGINE_SRC ${PROJECT_SOURCE_DIR}/src) -if (CUSTOMIZATION) - add_definitions(-DCUSTOMIZATION) -endif (CUSTOMIZATION) - include(ExternalProject) include(DefineOptions) include(BuildUtils) diff --git a/core/src/CMakeLists.txt b/core/src/CMakeLists.txt index b119a517d1..eda89ae93d 100644 --- a/core/src/CMakeLists.txt +++ b/core/src/CMakeLists.txt @@ -26,6 +26,11 @@ include_directories(${MILVUS_ENGINE_SRC}/grpc/gen-milvus) #this statement must put here, since the CORE_INCLUDE_DIRS is defined in code/CMakeList.txt add_subdirectory(index) + +if (CUSTOMIZATION) + add_definitions(-DCUSTOMIZATION) +endif (CUSTOMIZATION) + set(CORE_INCLUDE_DIRS ${CORE_INCLUDE_DIRS} PARENT_SCOPE) foreach (dir ${CORE_INCLUDE_DIRS}) include_directories(${dir}) diff --git a/core/src/index/cmake/ThirdPartyPackagesCore.cmake b/core/src/index/cmake/ThirdPartyPackagesCore.cmake index 4c233125bc..a7d9b9302f 100644 --- a/core/src/index/cmake/ThirdPartyPackagesCore.cmake +++ b/core/src/index/cmake/ThirdPartyPackagesCore.cmake @@ -244,6 +244,7 @@ if(CUSTOMIZATION) message(STATUS "Check the remote cache file ${FAISS_SOURCE_URL}. return code = ${return_code}") if (NOT return_code EQUAL 0) set(FAISS_SOURCE_URL "https://github.com/facebookresearch/faiss/archive/v1.5.3.tar.gz") + set(CUSTOMIZATION FALSE PARENT_SCOPE) endif() else() set(FAISS_SOURCE_URL "https://github.com/facebookresearch/faiss/archive/v1.5.3.tar.gz")