mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Allow system/local Abseil master
Add special handling when `absl_VERSION` is empty. This is the case when the `master` branch of `abseil-cpp` was installed using `CMake`. In that case check for VLOG availability through the CMake target `absl::absl_vlog_is_on`. Fixes: https://github.com/ceres-solver/ceres-solver/issues/1098 Change-Id: I3367aeb65caceb11558d8d6265dafe3ecc9a4875
This commit is contained in:
+6
-2
@@ -157,8 +157,12 @@ else()
|
||||
# For some reason unknown to me having the version number in the
|
||||
# find_package call fails. So we check for he minimum version
|
||||
# manually.
|
||||
if (absl_VERSION VERSION_LESS 20240116)
|
||||
message(FATAL_ERROR "The version of abseil installed on the system is " ${absl_VERSION} " need at least 20240116")
|
||||
if ("${absl_VERSION}" STREQUAL "")
|
||||
if (NOT TARGET absl::absl_vlog_is_on)
|
||||
message(FATAL_ERROR "The version of abseil installed on the system provides no version info and is missing TARGET 'absl::absl_vlog_is_on', need at least 20240116.0")
|
||||
endif()
|
||||
elseif (absl_VERSION VERSION_LESS 20240116)
|
||||
message(FATAL_ERROR "The version of abseil installed on the system is '${absl_VERSION}' need at least 20240116")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user