From cc6d6e2d8c92c29995af69c32822862a03597258 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Tue, 3 Aug 2021 02:33:16 -0400 Subject: [PATCH] Add binary package for absl to reduce configure and build times --- autobuild.xml | 76 +++++++++++++++++++++++++++++++++++ indra/deps/CMakeLists.txt | 61 ++++++++++++++-------------- indra/llcommon/CMakeLists.txt | 1 + indra/newview/CMakeLists.txt | 1 + 4 files changed, 109 insertions(+), 30 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index e7547a0b7ed..8342316f1dd 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -49,6 +49,82 @@ <key>version</key> <string>2.0.14</string> </map> + <key>abseil-cpp</key> + <map> + <key>canonical_repo</key> + <string>https://git.alchemyviewer.org/alchemy/thirdparty/3p-abseil-cpp</string> + <key>copyright</key> + <string>Copyright 2018 The Abseil Authors.</string> + <key>description</key> + <string>Abseil is an open-source collection of C++ code designed to augment the C++ standard library.</string> + <key>license</key> + <string>Apache 2.0</string> + <key>license_file</key> + <string>LICENSES/abseil-cpp.txt</string> + <key>name</key> + <string>abseil-cpp</string> + <key>platforms</key> + <map> + <key>darwin64</key> + <map> + <key>archive</key> + <map> + <key>hash</key> + <string>8a39c22df213748c1407f9deef27de6ebf4643c3310281bd619eb936275a8ca1fb6b66359652b6f62a83a8faa7d98b12</string> + <key>hash_algorithm</key> + <string>sha3_384</string> + <key>url</key> + <string>https://git.alchemyviewer.org/api/v4/projects/163/packages/generic/abseil-cpp/0.0.0.1044.1044/abseil_cpp-0.0.0.1044-darwin64-1044.tar.xz</string> + </map> + <key>name</key> + <string>darwin64</string> + </map> + <key>linux64</key> + <map> + <key>archive</key> + <map> + <key>hash</key> + <string>a5ac070e08969c6221bb038a38036fb45131bf7fb81c1651691931b46fdf07c0d6041beb328afc8cf71d23463e636f7b</string> + <key>hash_algorithm</key> + <string>sha3_384</string> + <key>url</key> + <string>https://git.alchemyviewer.org/api/v4/projects/163/packages/generic/abseil-cpp/0.0.0.1044.1044/abseil_cpp-0.0.0.1044-linux64-1044.tar.xz</string> + </map> + <key>name</key> + <string>linux64</string> + </map> + <key>windows</key> + <map> + <key>archive</key> + <map> + <key>hash</key> + <string>17dbe3aea3b61db570b36b91b0a69c7a508e58121f86829fa6ab16c4c28c3da5b1a84dc5a10dabf795a396faf77b32a0</string> + <key>hash_algorithm</key> + <string>sha3_384</string> + <key>url</key> + <string>https://git.alchemyviewer.org/api/v4/projects/163/packages/generic/abseil-cpp/0.0.0.1044.1044/abseil_cpp-0.0.0.1044-windows-1044.tar.xz</string> + </map> + <key>name</key> + <string>windows</string> + </map> + <key>windows64</key> + <map> + <key>archive</key> + <map> + <key>hash</key> + <string>61364464848fa6731f804ba06a490f009ffa3a30758d94a1420d8bc87e8cb112146619ffcb3a22cdb40322576e403779</string> + <key>hash_algorithm</key> + <string>sha3_384</string> + <key>url</key> + <string>https://git.alchemyviewer.org/api/v4/projects/163/packages/generic/abseil-cpp/0.0.0.1044.1044/abseil_cpp-0.0.0.1044-windows64-1044.tar.xz</string> + </map> + <key>name</key> + <string>windows64</string> + </map> + </map> + <key>version</key> + <string>0.0.0.1044</string> + </map> <key>apr_suite</key> <map> <key>copyright</key> diff --git a/indra/deps/CMakeLists.txt b/indra/deps/CMakeLists.txt index c4fcc98cfa3..acf7b6784da 100644 --- a/indra/deps/CMakeLists.txt +++ b/indra/deps/CMakeLists.txt @@ -2,6 +2,7 @@ project(deps) include(00-Common) include(FetchContent) +include(Abseil) set(CMAKE_FOLDER "Third Party") set(CMAKE_POSITION_INDEPENDENT_CODE ON) @@ -49,43 +50,43 @@ FetchContent_Declare( GIT_REPOSITORY https://git.alchemyviewer.org/alchemy/mirrors/modernjson.git GIT_TAG v3.9.1 ) -FetchContent_Declare( - absl - GIT_REPOSITORY https://git.alchemyviewer.org/alchemy/thirdparty/abseil-cpp.git - GIT_TAG a198d62533e8de0c33a6311f38a3335f7930b7c7 - ) + FetchContent_Declare( readerwriterqueue GIT_REPOSITORY https://github.com/cameron314/readerwriterqueue GIT_TAG v1.0.5 ) -# This is a hack because absl has dumb cmake -set(OLD_BUILD_TEST ${BUILD_TESTING}) -set(BUILD_TESTING OFF) -FetchContent_MakeAvailable(absl) -set(BUILD_TESTING ${OLD_BUILD_TEST}) - -# Supress warnings inside abseil under MSVC -if(WINDOWS) - target_compile_options(absl_strings PRIVATE /wd4018) - target_compile_options(absl_str_format_internal PRIVATE /wd4018) - target_compile_options(absl_flags_usage_internal PRIVATE /wd4018) - target_compile_options(absl_random_internal_distribution_test_util PRIVATE /wd4723) -elseif(LINUX) - target_compile_options(absl_flags PRIVATE -Wno-non-virtual-dtor) - target_compile_options(absl_flags_commandlineflag PRIVATE -Wno-non-virtual-dtor) - target_compile_options(absl_flags_internal PRIVATE -Wno-non-virtual-dtor) - target_compile_options(absl_flags_parse PRIVATE -Wno-non-virtual-dtor) - target_compile_options(absl_flags_private_handle_accessor PRIVATE -Wno-non-virtual-dtor) - target_compile_options(absl_flags_reflection PRIVATE -Wno-non-virtual-dtor) - target_compile_options(absl_flags_usage PRIVATE -Wno-non-virtual-dtor) - target_compile_options(absl_flags_usage_internal PRIVATE -Wno-non-virtual-dtor) -endif() +if(NOT USE_BINARY_ABSL) + FetchContent_Declare( + absl + GIT_REPOSITORY https://git.alchemyviewer.org/alchemy/thirdparty/abseil-cpp.git + GIT_TAG a198d62533e8de0c33a6311f38a3335f7930b7c7 + ) -# if (BUILD_TESTING) -# FetchContent_MakeAvailable(Catch2) -# endif() + # This is a hack because absl has dumb cmake + set(OLD_BUILD_TEST ${BUILD_TESTING}) + set(BUILD_TESTING OFF) + FetchContent_MakeAvailable(absl) + set(BUILD_TESTING ${OLD_BUILD_TEST}) + + # Supress warnings inside abseil under MSVC + if(WINDOWS) + target_compile_options(absl_strings PRIVATE /wd4018) + target_compile_options(absl_str_format_internal PRIVATE /wd4018) + target_compile_options(absl_flags_usage_internal PRIVATE /wd4018) + target_compile_options(absl_random_internal_distribution_test_util PRIVATE /wd4723) + elseif(LINUX) + target_compile_options(absl_flags PRIVATE -Wno-non-virtual-dtor) + target_compile_options(absl_flags_commandlineflag PRIVATE -Wno-non-virtual-dtor) + target_compile_options(absl_flags_internal PRIVATE -Wno-non-virtual-dtor) + target_compile_options(absl_flags_parse PRIVATE -Wno-non-virtual-dtor) + target_compile_options(absl_flags_private_handle_accessor PRIVATE -Wno-non-virtual-dtor) + target_compile_options(absl_flags_reflection PRIVATE -Wno-non-virtual-dtor) + target_compile_options(absl_flags_usage PRIVATE -Wno-non-virtual-dtor) + target_compile_options(absl_flags_usage_internal PRIVATE -Wno-non-virtual-dtor) + endif() +endif() # #Download the rest of the libraries FetchContent_MakeAvailable(fmt) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 9969d4731b4..0ca384b10e1 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -7,6 +7,7 @@ include(LLCommon) include(LLMath) include(bugsplat) include(Linking) +include(Abseil) include(Boost) include(LLSharedLibs) include(Copy3rdPartyLibs) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 9400d37c07e..ee92bacc8e6 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -54,6 +54,7 @@ include(ViewerManager) include(VisualLeakDetector) include(ZLIB) include(URIPARSER) +include(Abseil) if( LLPHYSICSEXTENSIONS_SRC_DIR ) if (NOT HAVOK_TPV) -- GitLab