diff options
author | Abseil Team <absl-team@google.com> | 2024-05-29 07:57:30 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-05-29 07:58:29 -0700 |
commit | 7ce797f21767a22fad7eed8f91962c08b8fa8d27 (patch) | |
tree | f2bcea7c3320d218f112d6f80eb45c939b94ad7f /CMakeLists.txt | |
parent | 64457068f2b1960e4c339e0c090eeb8b73ddddd6 (diff) | |
download | abseil-7ce797f21767a22fad7eed8f91962c08b8fa8d27.tar.gz abseil-7ce797f21767a22fad7eed8f91962c08b8fa8d27.tar.bz2 abseil-7ce797f21767a22fad7eed8f91962c08b8fa8d27.zip |
Enable building monolithic shared library on macOS and Linux.
PiperOrigin-RevId: 638284938
Change-Id: I4189215d85862a8eeaff5c477ff2e47252fa52d3
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 87f8ae82..56c054ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -149,6 +149,14 @@ set(ABSL_LOCAL_GOOGLETEST_DIR "/usr/src/googletest" CACHE PATH "If ABSL_USE_GOOGLETEST_HEAD is OFF and ABSL_GOOGLETEST_URL is not set, specifies the directory of a local GoogleTest checkout." ) +option(ABSL_BUILD_MONOLITHIC_SHARED_LIBS + "Build Abseil as a single shared library (always enabled for Windows)" + OFF +) +if(NOT BUILD_SHARED_LIBS AND ABSL_BUILD_MONOLITHIC_SHARED_LIBS) + message(WARNING "Not building a shared library because BUILD_SHARED_LIBS is not set. Ignoring ABSL_BUILD_MONOLITHIC_SHARED_LIBS.") +endif() + if((BUILD_TESTING AND ABSL_BUILD_TESTING) OR ABSL_BUILD_TEST_HELPERS) if (ABSL_USE_EXTERNAL_GOOGLETEST) if (ABSL_FIND_GOOGLETEST) |