diff --git a/flex/CMakeLists.txt b/flex/CMakeLists.txt index 3747e20334de..3ec503a64c47 100644 --- a/flex/CMakeLists.txt +++ b/flex/CMakeLists.txt @@ -115,6 +115,13 @@ else () include_directories(SYSTEM ${GFLAGS_INCLUDE_DIRS}) endif () +# find yaml-cpp----------------------------------------------------------------- +find_package(yaml-cpp REQUIRED) +include_directories(SYSTEM ${yaml-cpp_INCLUDE_DIRS}) +if (NOT yaml-cpp_FOUND) + message(FATAL_ERROR "yaml-cpp not found, please install the yaml-cpp library") +endif () + #find boost---------------------------------------------------------------------- find_package(Boost REQUIRED COMPONENTS system filesystem # required by folly diff --git a/flex/engines/graph_db/grin/CMakeLists.txt b/flex/engines/graph_db/grin/CMakeLists.txt index f62cd0285120..57be87af0657 100644 --- a/flex/engines/graph_db/grin/CMakeLists.txt +++ b/flex/engines/graph_db/grin/CMakeLists.txt @@ -52,9 +52,6 @@ include_directories(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/../../../third_party/nloh # include odps cpp sdk include_directories(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/../../../third_party/odps/include/) -find_package(yaml-cpp REQUIRED) -include_directories(SYSTEM ${yaml-cpp_INCLUDE_DIRS}) - include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../..) diff --git a/flex/storages/rt_mutable_graph/CMakeLists.txt b/flex/storages/rt_mutable_graph/CMakeLists.txt index 6db4a18e095a..e3a5b5124ace 100644 --- a/flex/storages/rt_mutable_graph/CMakeLists.txt +++ b/flex/storages/rt_mutable_graph/CMakeLists.txt @@ -1,7 +1,5 @@ # find yaml-cpp -find_package(yaml-cpp REQUIRED) -include_directories(SYSTEM ${yaml-cpp_INCLUDE_DIRS}) file(GLOB_RECURSE RT_MUTABLE_GRAPH_SRC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.cc") if (NOT BUILD_ODPS_FRAGMENT_LOADER)