xref: /aosp_15_r20/external/abseil-cpp/CMakeLists.txt (revision 9356374a3709195abf420251b3e825997ff56c0f)
1*9356374aSAndroid Build Coastguard Worker#
2*9356374aSAndroid Build Coastguard Worker# Copyright 2017 The Abseil Authors.
3*9356374aSAndroid Build Coastguard Worker#
4*9356374aSAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License");
5*9356374aSAndroid Build Coastguard Worker# you may not use this file except in compliance with the License.
6*9356374aSAndroid Build Coastguard Worker# You may obtain a copy of the License at
7*9356374aSAndroid Build Coastguard Worker#
8*9356374aSAndroid Build Coastguard Worker#      https://www.apache.org/licenses/LICENSE-2.0
9*9356374aSAndroid Build Coastguard Worker#
10*9356374aSAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software
11*9356374aSAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS,
12*9356374aSAndroid Build Coastguard Worker# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*9356374aSAndroid Build Coastguard Worker# See the License for the specific language governing permissions and
14*9356374aSAndroid Build Coastguard Worker# limitations under the License.
15*9356374aSAndroid Build Coastguard Worker#
16*9356374aSAndroid Build Coastguard Worker
17*9356374aSAndroid Build Coastguard Worker# https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md
18*9356374aSAndroid Build Coastguard Worker# As of 2024-07-01, CMake 3.16 is the minimum supported version.
19*9356374aSAndroid Build Coastguard Workercmake_minimum_required(VERSION 3.16)
20*9356374aSAndroid Build Coastguard Worker
21*9356374aSAndroid Build Coastguard Worker# Allow the user to specify the CMAKE_MSVC_DEBUG_INFORMATION_FORMAT
22*9356374aSAndroid Build Coastguard Workerif (POLICY CMP0141)
23*9356374aSAndroid Build Coastguard Worker  cmake_policy(SET CMP0141 NEW)
24*9356374aSAndroid Build Coastguard Workerendif (POLICY CMP0141)
25*9356374aSAndroid Build Coastguard Worker
26*9356374aSAndroid Build Coastguard Workerproject(absl LANGUAGES CXX VERSION 20240722)
27*9356374aSAndroid Build Coastguard Workerset(ABSL_SOVERSION "2407.0.0")
28*9356374aSAndroid Build Coastguard Workerinclude(CTest)
29*9356374aSAndroid Build Coastguard Worker
30*9356374aSAndroid Build Coastguard Worker# Output directory is correct by default for most build setups. However, when
31*9356374aSAndroid Build Coastguard Worker# building Abseil as a DLL, it is important to have the DLL in the same
32*9356374aSAndroid Build Coastguard Worker# directory as the executable using it. Thus, we put all executables in a single
33*9356374aSAndroid Build Coastguard Worker# /bin directory.
34*9356374aSAndroid Build Coastguard Workerset(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
35*9356374aSAndroid Build Coastguard Worker
36*9356374aSAndroid Build Coastguard Worker# when absl is included as subproject (i.e. using add_subdirectory(abseil-cpp))
37*9356374aSAndroid Build Coastguard Worker# in the source tree of a project that uses it, install rules are disabled.
38*9356374aSAndroid Build Coastguard Workerif(NOT CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
39*9356374aSAndroid Build Coastguard Worker  option(ABSL_ENABLE_INSTALL "Enable install rule" OFF)
40*9356374aSAndroid Build Coastguard Workerelse()
41*9356374aSAndroid Build Coastguard Worker  option(ABSL_ENABLE_INSTALL "Enable install rule" ON)
42*9356374aSAndroid Build Coastguard Workerendif()
43*9356374aSAndroid Build Coastguard Worker
44*9356374aSAndroid Build Coastguard Workerset(CMAKE_INSTALL_RPATH "$ORIGIN")
45*9356374aSAndroid Build Coastguard Workerset(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON)
46*9356374aSAndroid Build Coastguard Workerset(CMAKE_BUILD_RPATH_USE_ORIGIN ON)
47*9356374aSAndroid Build Coastguard Worker
48*9356374aSAndroid Build Coastguard Workeroption(ABSL_PROPAGATE_CXX_STD
49*9356374aSAndroid Build Coastguard Worker  "Use CMake C++ standard meta features (e.g. cxx_std_14) that propagate to targets that link to Abseil"
50*9356374aSAndroid Build Coastguard Worker  OFF)  # TODO: Default to ON for CMake 3.8 and greater.
51*9356374aSAndroid Build Coastguard Workerif(NOT ABSL_PROPAGATE_CXX_STD)
52*9356374aSAndroid Build Coastguard Worker  message(WARNING "A future Abseil release will default ABSL_PROPAGATE_CXX_STD to ON for CMake 3.8 and up. We recommend enabling this option to ensure your project still builds correctly.")
53*9356374aSAndroid Build Coastguard Workerendif()
54*9356374aSAndroid Build Coastguard Worker
55*9356374aSAndroid Build Coastguard Workeroption(ABSL_USE_SYSTEM_INCLUDES
56*9356374aSAndroid Build Coastguard Worker  "Silence warnings in Abseil headers by marking them as SYSTEM includes"
57*9356374aSAndroid Build Coastguard Worker  OFF)
58*9356374aSAndroid Build Coastguard Worker
59*9356374aSAndroid Build Coastguard Workerlist(APPEND CMAKE_MODULE_PATH
60*9356374aSAndroid Build Coastguard Worker  ${CMAKE_CURRENT_LIST_DIR}/CMake
61*9356374aSAndroid Build Coastguard Worker  ${CMAKE_CURRENT_LIST_DIR}/absl/copts
62*9356374aSAndroid Build Coastguard Worker)
63*9356374aSAndroid Build Coastguard Worker
64*9356374aSAndroid Build Coastguard Workeroption(ABSL_MSVC_STATIC_RUNTIME
65*9356374aSAndroid Build Coastguard Worker  "Link static runtime libraries"
66*9356374aSAndroid Build Coastguard Worker  OFF)
67*9356374aSAndroid Build Coastguard Workerif(ABSL_MSVC_STATIC_RUNTIME)
68*9356374aSAndroid Build Coastguard Worker  set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
69*9356374aSAndroid Build Coastguard Workerelse()
70*9356374aSAndroid Build Coastguard Worker  set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
71*9356374aSAndroid Build Coastguard Workerendif()
72*9356374aSAndroid Build Coastguard Worker
73*9356374aSAndroid Build Coastguard Workerinclude(CMakePackageConfigHelpers)
74*9356374aSAndroid Build Coastguard Workerinclude(GNUInstallDirs)
75*9356374aSAndroid Build Coastguard Workerinclude(AbseilDll)
76*9356374aSAndroid Build Coastguard Workerinclude(AbseilHelpers)
77*9356374aSAndroid Build Coastguard Worker
78*9356374aSAndroid Build Coastguard Worker
79*9356374aSAndroid Build Coastguard Worker##
80*9356374aSAndroid Build Coastguard Worker## Using absl targets
81*9356374aSAndroid Build Coastguard Worker##
82*9356374aSAndroid Build Coastguard Worker## all public absl targets are
83*9356374aSAndroid Build Coastguard Worker## exported with the absl:: prefix
84*9356374aSAndroid Build Coastguard Worker##
85*9356374aSAndroid Build Coastguard Worker## e.g absl::base absl::synchronization absl::strings ....
86*9356374aSAndroid Build Coastguard Worker##
87*9356374aSAndroid Build Coastguard Worker## DO NOT rely on the internal targets outside of the prefix
88*9356374aSAndroid Build Coastguard Worker
89*9356374aSAndroid Build Coastguard Worker
90*9356374aSAndroid Build Coastguard Worker# include current path
91*9356374aSAndroid Build Coastguard Workerlist(APPEND ABSL_COMMON_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR})
92*9356374aSAndroid Build Coastguard Worker
93*9356374aSAndroid Build Coastguard Workerif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
94*9356374aSAndroid Build Coastguard Worker  set(ABSL_USING_CLANG ON)
95*9356374aSAndroid Build Coastguard Workerelse()
96*9356374aSAndroid Build Coastguard Worker  set(ABSL_USING_CLANG OFF)
97*9356374aSAndroid Build Coastguard Workerendif()
98*9356374aSAndroid Build Coastguard Worker
99*9356374aSAndroid Build Coastguard Worker# find dependencies
100*9356374aSAndroid Build Coastguard Worker## pthread
101*9356374aSAndroid Build Coastguard Workerfind_package(Threads REQUIRED)
102*9356374aSAndroid Build Coastguard Worker
103*9356374aSAndroid Build Coastguard Workerinclude(CMakeDependentOption)
104*9356374aSAndroid Build Coastguard Worker
105*9356374aSAndroid Build Coastguard Workeroption(ABSL_BUILD_TESTING
106*9356374aSAndroid Build Coastguard Worker  "If ON, Abseil will build all of Abseil's own tests." OFF)
107*9356374aSAndroid Build Coastguard Worker
108*9356374aSAndroid Build Coastguard Workeroption(ABSL_BUILD_TEST_HELPERS
109*9356374aSAndroid Build Coastguard Worker  "If ON, Abseil will build libraries that you can use to write tests against Abseil code. This option requires that Abseil is configured to use GoogleTest."
110*9356374aSAndroid Build Coastguard Worker  OFF)
111*9356374aSAndroid Build Coastguard Worker
112*9356374aSAndroid Build Coastguard Workeroption(ABSL_USE_EXTERNAL_GOOGLETEST
113*9356374aSAndroid Build Coastguard Worker  "If ON, Abseil will assume that the targets for GoogleTest are already provided by the including project. This makes sense when Abseil is used with add_subdirectory." OFF)
114*9356374aSAndroid Build Coastguard Worker
115*9356374aSAndroid Build Coastguard Workercmake_dependent_option(ABSL_FIND_GOOGLETEST
116*9356374aSAndroid Build Coastguard Worker  "If ON, Abseil will use find_package(GTest) rather than assuming that GoogleTest is already provided by the including project."
117*9356374aSAndroid Build Coastguard Worker  ON
118*9356374aSAndroid Build Coastguard Worker  "ABSL_USE_EXTERNAL_GOOGLETEST"
119*9356374aSAndroid Build Coastguard Worker  OFF)
120*9356374aSAndroid Build Coastguard Worker
121*9356374aSAndroid Build Coastguard Worker
122*9356374aSAndroid Build Coastguard Workeroption(ABSL_USE_GOOGLETEST_HEAD
123*9356374aSAndroid Build Coastguard Worker  "If ON, abseil will download HEAD from GoogleTest at config time." OFF)
124*9356374aSAndroid Build Coastguard Worker
125*9356374aSAndroid Build Coastguard Workerset(ABSL_GOOGLETEST_DOWNLOAD_URL "" CACHE STRING "If set, download GoogleTest from this URL")
126*9356374aSAndroid Build Coastguard Worker
127*9356374aSAndroid Build Coastguard Workerset(ABSL_LOCAL_GOOGLETEST_DIR "/usr/src/googletest" CACHE PATH
128*9356374aSAndroid Build Coastguard Worker  "If ABSL_USE_GOOGLETEST_HEAD is OFF and ABSL_GOOGLETEST_URL is not set, specifies the directory of a local GoogleTest checkout."
129*9356374aSAndroid Build Coastguard Worker  )
130*9356374aSAndroid Build Coastguard Worker
131*9356374aSAndroid Build Coastguard Workeroption(ABSL_BUILD_MONOLITHIC_SHARED_LIBS
132*9356374aSAndroid Build Coastguard Worker  "Build Abseil as a single shared library (always enabled for Windows)"
133*9356374aSAndroid Build Coastguard Worker  OFF
134*9356374aSAndroid Build Coastguard Worker)
135*9356374aSAndroid Build Coastguard Workerif(NOT BUILD_SHARED_LIBS AND ABSL_BUILD_MONOLITHIC_SHARED_LIBS)
136*9356374aSAndroid Build Coastguard Worker  message(WARNING "Not building a shared library because BUILD_SHARED_LIBS is not set. Ignoring ABSL_BUILD_MONOLITHIC_SHARED_LIBS.")
137*9356374aSAndroid Build Coastguard Workerendif()
138*9356374aSAndroid Build Coastguard Worker
139*9356374aSAndroid Build Coastguard Workerif((BUILD_TESTING AND ABSL_BUILD_TESTING) OR ABSL_BUILD_TEST_HELPERS)
140*9356374aSAndroid Build Coastguard Worker  if (ABSL_USE_EXTERNAL_GOOGLETEST)
141*9356374aSAndroid Build Coastguard Worker    if (ABSL_FIND_GOOGLETEST)
142*9356374aSAndroid Build Coastguard Worker      find_package(GTest REQUIRED)
143*9356374aSAndroid Build Coastguard Worker    elseif(NOT TARGET GTest::gtest)
144*9356374aSAndroid Build Coastguard Worker      if(TARGET gtest)
145*9356374aSAndroid Build Coastguard Worker        # When Google Test is included directly rather than through find_package, the aliases are missing.
146*9356374aSAndroid Build Coastguard Worker        add_library(GTest::gtest ALIAS gtest)
147*9356374aSAndroid Build Coastguard Worker        add_library(GTest::gtest_main ALIAS gtest_main)
148*9356374aSAndroid Build Coastguard Worker        add_library(GTest::gmock ALIAS gmock)
149*9356374aSAndroid Build Coastguard Worker        add_library(GTest::gmock_main ALIAS gmock_main)
150*9356374aSAndroid Build Coastguard Worker      else()
151*9356374aSAndroid Build Coastguard Worker        message(FATAL_ERROR "ABSL_USE_EXTERNAL_GOOGLETEST is ON and ABSL_FIND_GOOGLETEST is OFF, which means that the top-level project must build the Google Test project. However, the target gtest was not found.")
152*9356374aSAndroid Build Coastguard Worker      endif()
153*9356374aSAndroid Build Coastguard Worker    endif()
154*9356374aSAndroid Build Coastguard Worker  else()
155*9356374aSAndroid Build Coastguard Worker    set(absl_gtest_build_dir ${CMAKE_BINARY_DIR}/googletest-build)
156*9356374aSAndroid Build Coastguard Worker    if(ABSL_USE_GOOGLETEST_HEAD AND ABSL_GOOGLETEST_DOWNLOAD_URL)
157*9356374aSAndroid Build Coastguard Worker      message(FATAL_ERROR "Do not set both ABSL_USE_GOOGLETEST_HEAD and ABSL_GOOGLETEST_DOWNLOAD_URL")
158*9356374aSAndroid Build Coastguard Worker    endif()
159*9356374aSAndroid Build Coastguard Worker    if(ABSL_USE_GOOGLETEST_HEAD)
160*9356374aSAndroid Build Coastguard Worker      set(absl_gtest_download_url "https://github.com/google/googletest/archive/main.zip")
161*9356374aSAndroid Build Coastguard Worker    elseif(ABSL_GOOGLETEST_DOWNLOAD_URL)
162*9356374aSAndroid Build Coastguard Worker      set(absl_gtest_download_url ${ABSL_GOOGLETEST_DOWNLOAD_URL})
163*9356374aSAndroid Build Coastguard Worker    endif()
164*9356374aSAndroid Build Coastguard Worker    if(absl_gtest_download_url)
165*9356374aSAndroid Build Coastguard Worker      set(absl_gtest_src_dir ${CMAKE_BINARY_DIR}/googletest-src)
166*9356374aSAndroid Build Coastguard Worker    else()
167*9356374aSAndroid Build Coastguard Worker      set(absl_gtest_src_dir ${ABSL_LOCAL_GOOGLETEST_DIR})
168*9356374aSAndroid Build Coastguard Worker    endif()
169*9356374aSAndroid Build Coastguard Worker    include(CMake/Googletest/DownloadGTest.cmake)
170*9356374aSAndroid Build Coastguard Worker  endif()
171*9356374aSAndroid Build Coastguard Workerendif()
172*9356374aSAndroid Build Coastguard Worker
173*9356374aSAndroid Build Coastguard Workeradd_subdirectory(absl)
174*9356374aSAndroid Build Coastguard Worker
175*9356374aSAndroid Build Coastguard Workerif(ABSL_ENABLE_INSTALL)
176*9356374aSAndroid Build Coastguard Worker
177*9356374aSAndroid Build Coastguard Worker
178*9356374aSAndroid Build Coastguard Worker  # install as a subdirectory only
179*9356374aSAndroid Build Coastguard Worker  install(EXPORT ${PROJECT_NAME}Targets
180*9356374aSAndroid Build Coastguard Worker    NAMESPACE absl::
181*9356374aSAndroid Build Coastguard Worker    DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
182*9356374aSAndroid Build Coastguard Worker  )
183*9356374aSAndroid Build Coastguard Worker
184*9356374aSAndroid Build Coastguard Worker  configure_package_config_file(
185*9356374aSAndroid Build Coastguard Worker    CMake/abslConfig.cmake.in
186*9356374aSAndroid Build Coastguard Worker    "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
187*9356374aSAndroid Build Coastguard Worker    INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
188*9356374aSAndroid Build Coastguard Worker  )
189*9356374aSAndroid Build Coastguard Worker  install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
190*9356374aSAndroid Build Coastguard Worker    DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
191*9356374aSAndroid Build Coastguard Worker  )
192*9356374aSAndroid Build Coastguard Worker
193*9356374aSAndroid Build Coastguard Worker  # Abseil only has a version in LTS releases.  This mechanism is accomplished
194*9356374aSAndroid Build Coastguard Worker  # Abseil's internal Copybara (https://github.com/google/copybara) workflows and
195*9356374aSAndroid Build Coastguard Worker  # isn't visible in the CMake buildsystem itself.
196*9356374aSAndroid Build Coastguard Worker  if(absl_VERSION)
197*9356374aSAndroid Build Coastguard Worker    write_basic_package_version_file(
198*9356374aSAndroid Build Coastguard Worker      "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
199*9356374aSAndroid Build Coastguard Worker      COMPATIBILITY ExactVersion
200*9356374aSAndroid Build Coastguard Worker    )
201*9356374aSAndroid Build Coastguard Worker
202*9356374aSAndroid Build Coastguard Worker    install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
203*9356374aSAndroid Build Coastguard Worker      DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"
204*9356374aSAndroid Build Coastguard Worker    )
205*9356374aSAndroid Build Coastguard Worker  endif()  # absl_VERSION
206*9356374aSAndroid Build Coastguard Worker
207*9356374aSAndroid Build Coastguard Worker  install(DIRECTORY absl
208*9356374aSAndroid Build Coastguard Worker    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
209*9356374aSAndroid Build Coastguard Worker    FILES_MATCHING
210*9356374aSAndroid Build Coastguard Worker      PATTERN "*.inc"
211*9356374aSAndroid Build Coastguard Worker      PATTERN "*.h"
212*9356374aSAndroid Build Coastguard Worker      PATTERN "copts" EXCLUDE
213*9356374aSAndroid Build Coastguard Worker      PATTERN "testdata" EXCLUDE
214*9356374aSAndroid Build Coastguard Worker    )
215*9356374aSAndroid Build Coastguard Worker
216*9356374aSAndroid Build Coastguard Worker  # Rewrite options.h to use the compiled ABI.
217*9356374aSAndroid Build Coastguard Worker  file(READ "absl/base/options.h" ABSL_INTERNAL_OPTIONS_H_CONTENTS)
218*9356374aSAndroid Build Coastguard Worker
219*9356374aSAndroid Build Coastguard Worker  # Handle features that require at least C++20.
220*9356374aSAndroid Build Coastguard Worker  if (ABSL_INTERNAL_AT_LEAST_CXX20)
221*9356374aSAndroid Build Coastguard Worker    foreach(FEATURE "ORDERING")
222*9356374aSAndroid Build Coastguard Worker      string(REPLACE
223*9356374aSAndroid Build Coastguard Worker      "#define ABSL_OPTION_USE_STD_${FEATURE} 2"
224*9356374aSAndroid Build Coastguard Worker      "#define ABSL_OPTION_USE_STD_${FEATURE} 1"
225*9356374aSAndroid Build Coastguard Worker      ABSL_INTERNAL_OPTIONS_H_PINNED
226*9356374aSAndroid Build Coastguard Worker      "${ABSL_INTERNAL_OPTIONS_H_CONTENTS}")
227*9356374aSAndroid Build Coastguard Worker      set(ABSL_INTERNAL_OPTIONS_H_CONTENTS "${ABSL_INTERNAL_OPTIONS_H_PINNED}")
228*9356374aSAndroid Build Coastguard Worker    endforeach()
229*9356374aSAndroid Build Coastguard Worker  endif()
230*9356374aSAndroid Build Coastguard Worker
231*9356374aSAndroid Build Coastguard Worker  # Handle features that require at least C++17.
232*9356374aSAndroid Build Coastguard Worker  if (ABSL_INTERNAL_AT_LEAST_CXX17)
233*9356374aSAndroid Build Coastguard Worker    foreach(FEATURE "ANY" "OPTIONAL" "STRING_VIEW" "VARIANT")
234*9356374aSAndroid Build Coastguard Worker      string(REPLACE
235*9356374aSAndroid Build Coastguard Worker      "#define ABSL_OPTION_USE_STD_${FEATURE} 2"
236*9356374aSAndroid Build Coastguard Worker      "#define ABSL_OPTION_USE_STD_${FEATURE} 1"
237*9356374aSAndroid Build Coastguard Worker      ABSL_INTERNAL_OPTIONS_H_PINNED
238*9356374aSAndroid Build Coastguard Worker      "${ABSL_INTERNAL_OPTIONS_H_CONTENTS}")
239*9356374aSAndroid Build Coastguard Worker      set(ABSL_INTERNAL_OPTIONS_H_CONTENTS "${ABSL_INTERNAL_OPTIONS_H_PINNED}")
240*9356374aSAndroid Build Coastguard Worker    endforeach()
241*9356374aSAndroid Build Coastguard Worker  endif()
242*9356374aSAndroid Build Coastguard Worker
243*9356374aSAndroid Build Coastguard Worker  # Any feature that still has the value of 2 (because it was not handled above)
244*9356374aSAndroid Build Coastguard Worker  # should be set to 0.
245*9356374aSAndroid Build Coastguard Worker  string(REGEX REPLACE
246*9356374aSAndroid Build Coastguard Worker    "#define ABSL_OPTION_USE_STD_([^ ]*) 2"
247*9356374aSAndroid Build Coastguard Worker    "#define ABSL_OPTION_USE_STD_\\1 0"
248*9356374aSAndroid Build Coastguard Worker    ABSL_INTERNAL_OPTIONS_H_PINNED
249*9356374aSAndroid Build Coastguard Worker    "${ABSL_INTERNAL_OPTIONS_H_CONTENTS}")
250*9356374aSAndroid Build Coastguard Worker
251*9356374aSAndroid Build Coastguard Worker  file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/options-pinned.h" CONTENT "${ABSL_INTERNAL_OPTIONS_H_PINNED}")
252*9356374aSAndroid Build Coastguard Worker
253*9356374aSAndroid Build Coastguard Worker  install(FILES "${CMAKE_BINARY_DIR}/options-pinned.h"
254*9356374aSAndroid Build Coastguard Worker         DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/absl/base
255*9356374aSAndroid Build Coastguard Worker         RENAME "options.h")
256*9356374aSAndroid Build Coastguard Worker
257*9356374aSAndroid Build Coastguard Workerendif()  # ABSL_ENABLE_INSTALL
258