From 73b48c97d77842de343bfec1a0f3acf61c3ba912 Mon Sep 17 00:00:00 2001 From: David Sisson Date: Mon, 10 Jul 2023 12:40:10 -0700 Subject: [PATCH] Now calls third-party after checking protobuf dependencies to properly determine if abseil is needed. --- CMakeLists.txt | 4 ++-- third_party/CMakeLists.txt | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 42ad3892..bd7fe7e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,8 +20,6 @@ option( include_directories(include) include_directories(src) -add_subdirectory(third_party) - # TODO: Simplify once we can require cmake 3.27 (where CONFIG is default). # Due to packaging changes we use the combined protobuf/absl packaging if @@ -35,6 +33,8 @@ else() set(ABSL_INCLUDED_WITH_PROTOBUF OFF) endif() +add_subdirectory(third_party) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules") include(BuildUtils) diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index dfb1bc02..7b8d8e60 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -1,8 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 -if(${ABSL_INCLUDED_WITH_PROTOBUF}) - # Remove abseil-cpp from the repo when we can require cmake 3.27. -else() +if(NOT ${ABSL_INCLUDED_WITH_PROTOBUF}) set(ABSL_PROPAGATE_CXX_STD ON) add_subdirectory(abseil-cpp) endif()