From e409c0492f1b1ce63606c0b693c92cdb36dcc28b Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Sat, 2 Mar 2019 11:58:11 -0500
Subject: convert to an explicit USE_BUGSPLAT switch in cmake, revise LL_ERRS
 approach

---
 indra/CMakeLists.txt | 10 ++++++++++
 1 file changed, 10 insertions(+)

(limited to 'indra/CMakeLists.txt')

diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt
index 62a8f3f003..cf6029c4ae 100644
--- a/indra/CMakeLists.txt
+++ b/indra/CMakeLists.txt
@@ -13,6 +13,7 @@ project(${ROOT_PROJECT_NAME})
 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
 
 include(Variables)
+include(bugsplat)
 include(BuildVersion)
 
 if (NOT CMAKE_BUILD_TYPE)
@@ -89,6 +90,15 @@ set_property(
     PROPERTY VS_STARTUP_PROJECT secondlife-bin
     )
 
+if (USE_BUGSPLAT)
+    if (BUGSPLAT_DB)
+        message(STATUS "Building with BugSplat; database '${BUGSPLAT_DB}'")
+    else (BUGSPLAT_DB)
+        message(WARNING "Building with BugSplat, but no database name set (BUGSPLAT_DB)")
+    endif (BUGSPLAT_DB)
+else (USE_BUGSPLAT)
+    message(STATUS "Not building with BugSplat")
+endif (USE_BUGSPLAT)
 if (LL_TESTS)
   # Define after the custom targets are created so
   # individual apps can add themselves as dependencies
-- 
cgit v1.2.3


From b6f1529b5abaf36b15efb6d9215bcc89e6a3f167 Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Thu, 6 Jun 2019 09:25:15 -0400
Subject: remove the old crash logger modules when using BugSplat

---
 indra/CMakeLists.txt | 40 +++++++++++++++++++++++-----------------
 1 file changed, 23 insertions(+), 17 deletions(-)

(limited to 'indra/CMakeLists.txt')

diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt
index cf6029c4ae..4dd2dcc2e9 100644
--- a/indra/CMakeLists.txt
+++ b/indra/CMakeLists.txt
@@ -60,29 +60,18 @@ add_subdirectory(${LIBS_OPEN_PREFIX}media_plugins)
 endif (ENABLE_MEDIA_PLUGINS)
 
 if (LINUX)
-  add_subdirectory(${VIEWER_PREFIX}linux_crash_logger)
   if (INSTALL_PROPRIETARY)
       include(LLAppearanceUtility)
       add_subdirectory(${LLAPPEARANCEUTILITY_SRC_DIR} ${LLAPPEARANCEUTILITY_BIN_DIR})
   endif (INSTALL_PROPRIETARY)
-  add_dependencies(viewer linux-crash-logger-strip-target)
-elseif (DARWIN)
-  add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
-  add_dependencies(viewer mac-crash-logger)
-elseif (WINDOWS)
-  add_subdirectory(${VIEWER_PREFIX}win_crash_logger)
-  # cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake
-  if (EXISTS ${VIEWER_DIR}win_setup)
-    add_subdirectory(${VIEWER_DIR}win_setup)
-  endif (EXISTS ${VIEWER_DIR}win_setup)
-  # add_dependencies(viewer windows-setup windows-crash-logger)
-  add_dependencies(viewer windows-crash-logger)
 endif (LINUX)
 
-add_subdirectory(${VIEWER_PREFIX}newview)
-add_dependencies(viewer secondlife-bin)
-
-add_subdirectory(${VIEWER_PREFIX}doxygen EXCLUDE_FROM_ALL)
+if (WINDOWS)
+    # cmake EXISTS requires an absolute path, see indra/cmake/Variables.cmake
+    if (EXISTS ${VIEWER_DIR}win_setup)
+      add_subdirectory(${VIEWER_DIR}win_setup)
+    endif (EXISTS ${VIEWER_DIR}win_setup)
+endif (WINDOWS)
 
 # sets the 'startup project' for debugging from visual studio.
 set_property(
@@ -98,7 +87,24 @@ if (USE_BUGSPLAT)
     endif (BUGSPLAT_DB)
 else (USE_BUGSPLAT)
     message(STATUS "Not building with BugSplat")
+    if (LINUX)
+      add_subdirectory(${VIEWER_PREFIX}linux_crash_logger)
+      add_dependencies(viewer linux-crash-logger-strip-target)
+    elseif (DARWIN)
+      add_subdirectory(${VIEWER_PREFIX}mac_crash_logger)
+      add_dependencies(viewer mac-crash-logger)
+    elseif (WINDOWS)
+      add_subdirectory(${VIEWER_PREFIX}win_crash_logger)
+      # add_dependencies(viewer windows-setup windows-crash-logger)
+      add_dependencies(viewer windows-crash-logger)
+    endif (LINUX)
 endif (USE_BUGSPLAT)
+
+add_subdirectory(${VIEWER_PREFIX}newview)
+add_dependencies(viewer secondlife-bin)
+
+add_subdirectory(${VIEWER_PREFIX}doxygen EXCLUDE_FROM_ALL)
+
 if (LL_TESTS)
   # Define after the custom targets are created so
   # individual apps can add themselves as dependencies
-- 
cgit v1.2.3


From de5c07ec50d192e5a34cf710e2d1ed0c1127932f Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Mon, 7 Oct 2019 10:50:32 -0400
Subject: do not build the old crash logger when using bugsplat

---
 indra/CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'indra/CMakeLists.txt')

diff --git a/indra/CMakeLists.txt b/indra/CMakeLists.txt
index 4dd2dcc2e9..bd3bcd1173 100644
--- a/indra/CMakeLists.txt
+++ b/indra/CMakeLists.txt
@@ -46,7 +46,10 @@ endif (WINDOWS AND EXISTS ${LIBS_CLOSED_DIR}copy_win_scripts)
 
 add_custom_target(viewer)
 
+if (NOT USE_BUGSPLAT)
 add_subdirectory(${LIBS_OPEN_PREFIX}llcrashlogger)
+endif (NOT USE_BUGSPLAT)
+
 add_subdirectory(${LIBS_OPEN_PREFIX}llplugin)
 add_subdirectory(${LIBS_OPEN_PREFIX}llui)
 add_subdirectory(${LIBS_OPEN_PREFIX}viewer_components)
-- 
cgit v1.2.3