summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2021-05-12 13:56:19 -0400
committerNat Goodspeed <nat@lindenlab.com>2021-05-12 13:56:19 -0400
commitfd1545197ac5ea1cc248aa98220c5d078c9555ee (patch)
tree819b9ffac9d400ede46c8818eb0ff776e26f10f9 /indra/cmake
parent91c20363eee4e1e02435e0ee74867cdb3f6c7136 (diff)
parent6007475c87d3edbb023cc64bb097d33e6c04dfd4 (diff)
SL-10297: Merge branch 'sl-10297-oz' into sl-10297.
Bring in Oz's tweaks to the way BugSplat is engaged and tested, plus a few other miscellaneous goodies.
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/Copy3rdPartyLibs.cmake4
-rw-r--r--indra/cmake/LLAddBuildTest.cmake13
-rw-r--r--indra/cmake/Variables.cmake1
-rw-r--r--indra/cmake/bugsplat.cmake53
4 files changed, 44 insertions, 27 deletions
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index de81512eef..46ddb9d15b 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -66,7 +66,7 @@ if(WINDOWS)
# Filenames are different for 32/64 bit BugSplat file and we don't
# have any control over them so need to branch.
- if (BUGSPLAT_DB)
+ if (USE_BUGSPLAT)
if(ADDRESS_SIZE EQUAL 32)
set(release_files ${release_files} BugSplat.dll)
set(release_files ${release_files} BugSplatRc.dll)
@@ -76,7 +76,7 @@ if(WINDOWS)
set(release_files ${release_files} BugSplatRc64.dll)
set(release_files ${release_files} BsSndRpt64.exe)
endif(ADDRESS_SIZE EQUAL 32)
- endif (BUGSPLAT_DB)
+ endif (USE_BUGSPLAT)
if (FMODSTUDIO)
set(debug_files ${debug_files} fmodL.dll)
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index 4932e9044f..4937c2a9d7 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -2,6 +2,7 @@
include(00-Common)
include(LLTestCommand)
include(GoogleMock)
+include(bugsplat)
include(Tut)
#*****************************************************************************
@@ -22,7 +23,6 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources)
# there is another branch that will conflict heavily with any changes here.
INCLUDE(GoogleMock)
-
IF(LL_TEST_VERBOSE)
MESSAGE("LL_ADD_PROJECT_UNIT_TESTS UNITTEST_PROJECT_${project} sources: ${sources}")
ENDIF(LL_TEST_VERBOSE)
@@ -87,6 +87,12 @@ INCLUDE(GoogleMock)
IF(LL_TEST_VERBOSE)
MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_SOURCE_FILES ${${name}_test_SOURCE_FILES}")
ENDIF(LL_TEST_VERBOSE)
+
+ if (USE_BUGSPLAT)
+ SET_PROPERTY(SOURCE ${${name}_test_SOURCE_FILES}
+ APPEND PROPERTY COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}")
+ endif (USE_BUGSPLAT)
+
# Headers
GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_HEADER_FILES ${source} LL_TEST_ADDITIONAL_HEADER_FILES)
SET(${name}_test_HEADER_FILES ${name}.h ${${name}_test_additional_HEADER_FILES})
@@ -224,6 +230,11 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES COMPILE_FLAGS -I"${TUT_INCLUDE_DIR}")
endif(USESYSTEMLIBS)
+ if (USE_BUGSPLAT)
+ SET_PROPERTY(SOURCE ${source_files}
+ APPEND PROPERTY COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}")
+ endif (USE_BUGSPLAT)
+
# The following was copied to llcorehttp/CMakeLists.txt's texture_load target.
# Any changes made here should be replicated there.
if (WINDOWS)
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index a5770c5528..c81b22e572 100644
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -34,7 +34,6 @@ set(LL_TESTS ON CACHE BOOL "Build and run unit and integration tests (disable fo
set(INCREMENTAL_LINK OFF CACHE BOOL "Use incremental linking on win32 builds (enable for faster links on some machines)")
set(ENABLE_MEDIA_PLUGINS ON CACHE BOOL "Turn off building media plugins if they are imported by third-party library mechanism")
set(VIEWER_SYMBOL_FILE "" CACHE STRING "Name of tarball into which to place symbol files")
-set(BUGSPLAT_DB "" CACHE STRING "BugSplat database name, if BugSplat crash reporting is desired")
if(LIBS_CLOSED_DIR)
file(TO_CMAKE_PATH "${LIBS_CLOSED_DIR}" LIBS_CLOSED_DIR)
diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake
index 59644b73ce..5f5cc51f63 100644
--- a/indra/cmake/bugsplat.cmake
+++ b/indra/cmake/bugsplat.cmake
@@ -1,25 +1,32 @@
-# BugSplat is engaged by setting BUGSPLAT_DB to the target BugSplat database
-# name.
-if (BUGSPLAT_DB)
- if (USESYSTEMLIBS)
- message(STATUS "Looking for system BugSplat")
- set(BUGSPLAT_FIND_QUIETLY ON)
- set(BUGSPLAT_FIND_REQUIRED ON)
- include(FindBUGSPLAT)
- else (USESYSTEMLIBS)
- message(STATUS "Engaging autobuild BugSplat")
- include(Prebuilt)
- use_prebuilt_binary(bugsplat)
- if (WINDOWS)
- set(BUGSPLAT_LIBRARIES
- ${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat.lib
- )
- elseif (DARWIN)
- find_library(BUGSPLAT_LIBRARIES BugsplatMac
- PATHS "${ARCH_PREBUILT_DIRS_RELEASE}")
- else (WINDOWS)
+if (INSTALL_PROPRIETARY)
+ set(USE_BUGSPLAT ON CACHE BOOL "Use the BugSplat crash reporting system")
+else (INSTALL_PROPRIETARY)
+ set(USE_BUGSPLAT OFF CACHE BOOL "Use the BugSplat crash reporting system")
+endif (INSTALL_PROPRIETARY)
+
+if (USE_BUGSPLAT)
+ if (NOT USESYSTEMLIBS)
+ include(Prebuilt)
+ use_prebuilt_binary(bugsplat)
+ if (WINDOWS)
+ set(BUGSPLAT_LIBRARIES
+ ${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat.lib
+ )
+ elseif (DARWIN)
+ find_library(BUGSPLAT_LIBRARIES BugsplatMac REQUIRED
+ NO_DEFAULT_PATH PATHS "${ARCH_PREBUILT_DIRS_RELEASE}")
+ else (WINDOWS)
+ message(FATAL_ERROR "BugSplat is not supported; add -DUSE_BUGSPLAT=OFF")
+ endif (WINDOWS)
+ else (NOT USESYSTEMLIBS)
+ set(BUGSPLAT_FIND_QUIETLY ON)
+ set(BUGSPLAT_FIND_REQUIRED ON)
+ include(FindBUGSPLAT)
+ endif (NOT USESYSTEMLIBS)
+
+ set(BUGSPLAT_DB "" CACHE STRING "BugSplat crash database name")
- endif (WINDOWS)
set(BUGSPLAT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/bugsplat)
- endif (USESYSTEMLIBS)
-endif (BUGSPLAT_DB)
+ set(BUGSPLAT_DEFINE "LL_BUGSPLAT")
+endif (USE_BUGSPLAT)
+