summaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2023-02-17 16:41:38 -0800
committerGravatar Copybara-Service <copybara-worker@google.com>2023-02-17 16:42:21 -0800
commitbd624d9f9825f76f14453beb3df81d82b9e17062 (patch)
tree9886bea4658604478a55917857002b889d76da43 /CMake
parentd32a746c2d63973ab51ec0162f9552f96683219c (diff)
fix(CMake): correct target variable for DLLs
The `_dll` variable contains the target name. The code was trying to use `_NAME` when handling ABSL_PROPAGATE_CXX_STD. Probably a cut&paste error from the other places where we handle that option. PiperOrigin-RevId: 510551097 Change-Id: I006435978333dd7a72a300503389a7bf48fb6d0d
Diffstat (limited to 'CMake')
-rw-r--r--CMake/AbseilDll.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/CMake/AbseilDll.cmake b/CMake/AbseilDll.cmake
index 3c0f6901..40219207 100644
--- a/CMake/AbseilDll.cmake
+++ b/CMake/AbseilDll.cmake
@@ -789,7 +789,7 @@ Cflags: -I\${includedir}${PC_CFLAGS}\n")
# Abseil libraries require C++14 as the current minimum standard. When
# compiled with C++17 (either because it is the compiler's default or
# explicitly requested), then Abseil requires C++17.
- _absl_target_compile_features_if_available(${_NAME} PUBLIC ${ABSL_INTERNAL_CXX_STD_FEATURE})
+ _absl_target_compile_features_if_available(${_dll} PUBLIC ${ABSL_INTERNAL_CXX_STD_FEATURE})
else()
# Note: This is legacy (before CMake 3.8) behavior. Setting the
# target-level CXX_STANDARD property to ABSL_CXX_STANDARD (which is
@@ -799,8 +799,8 @@ Cflags: -I\${includedir}${PC_CFLAGS}\n")
# CXX_STANDARD_REQUIRED does guard against the top-level CMake project
# not having enabled CMAKE_CXX_STANDARD_REQUIRED (which prevents
# "decaying" to an older standard if the requested one isn't available).
- set_property(TARGET ${_NAME} PROPERTY CXX_STANDARD ${ABSL_CXX_STANDARD})
- set_property(TARGET ${_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
+ set_property(TARGET ${_dll} PROPERTY CXX_STANDARD ${ABSL_CXX_STANDARD})
+ set_property(TARGET ${_dll} PROPERTY CXX_STANDARD_REQUIRED ON)
endif()
install(TARGETS ${_dll} EXPORT ${PROJECT_NAME}Targets