Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ endif()
set(THIRDPARTY_DIRECTORY "${CMAKE_SOURCE_DIR}/third_party")
# TODO: b/462767957 - remove set(CMAKE_INSTALL_PREFIX ...) once we fix search path and mac build.
set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/install")
option(DIVE_BUILD_WITH_CRASHPAD "Build Dive with CrashPad" ON)

# Add an option to allow users to easily toggle the runtime layer build
option(
Expand Down Expand Up @@ -162,15 +163,17 @@ if(NOT ANDROID)
list(POP_BACK CMAKE_MESSAGE_INDENT)
message(CHECK_PASS "done")

message(CHECK_START "Generate build files for third_party/crashpad")
list(APPEND CMAKE_MESSAGE_INDENT " ")
set(CRASHPAD_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(CRASHPAD_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
add_subdirectory(third_party/crashpad EXCLUDE_FROM_ALL)
list(POP_BACK CMAKE_MESSAGE_INDENT)
message(CHECK_PASS "done")
add_library(crashpad_client ALIAS client)
set_target_properties(handler PROPERTIES OUTPUT_NAME "crashpad_handler")
if(DIVE_BUILD_WITH_CRASHPAD)
message(CHECK_START "Generate build files for third_party/crashpad")
list(APPEND CMAKE_MESSAGE_INDENT " ")
set(CRASHPAD_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(CRASHPAD_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
add_subdirectory(third_party/crashpad EXCLUDE_FROM_ALL)
list(POP_BACK CMAKE_MESSAGE_INDENT)
message(CHECK_PASS "done")
add_library(crashpad_client ALIAS client)
set_target_properties(handler PROPERTIES OUTPUT_NAME "crashpad_handler")
endif()
else()
message(
CHECK_START
Expand Down
2 changes: 1 addition & 1 deletion src/dive/crashpad/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
add_library(
dive_crashpad
crashpad_client.h
crashpad_client.cpp
$<IF:$<BOOL:${DIVE_BUILD_WITH_CRASHPAD}>,crashpad_client.cpp,crashpad_client_stub.cpp>
crashpad_utils.h
$<$<PLATFORM_ID:Windows>:crashpad_utils_win32.cpp>
$<$<PLATFORM_ID:Darwin>:crashpad_utils_macos.cpp>
Expand Down
25 changes: 25 additions & 0 deletions src/dive/crashpad/crashpad_client_stub.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
Copyright 2026 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

#include "absl/status/status.h"
#include "crashpad_client.h"

namespace Dive
{

absl::Status InitializeCrashpad() { return absl::OkStatus(); }

} // namespace Dive
Loading