Skip to content

Commit

Permalink
Only compile crashpad if the user wants it.
Browse files Browse the repository at this point in the history
This was incorrectly implemented. When depot_tools wasn't detected, it would still attempt compilation. This commit prevents that attempt.
  • Loading branch information
jameskr97 committed Nov 18, 2020
1 parent 49f3b5e commit 86ff96b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) # Enable folders
add_executable(Etterna)

# Project Compile Options
set(WITH_CRASHPAD TRUE CACHE BOOL "Compile with Crash Handler (Requires Python 2 installed)")
set(WITH_CRASHPAD TRUE CACHE BOOL "Compile with Crash Handler (Requires depot_tools installed)")

## Setting Target Properties
### Set a different name for each output binary depending on what build configuration is.
Expand Down
6 changes: 4 additions & 2 deletions extern/crashpad/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
# "gclient" is a binary known to be apart of depot_tools.
find_program(DEPOT_TOOLS_EXIST gclient)
if(NOT DEPOT_TOOLS_EXIST)
message(WARNING " depot_tools were not found. Crashpad will be disabled. If you would like to build"
" crashpad, please ensure depot_tools have been added to your system path.")
message(WARNING " depot_tools were not found. Crashpad will be disabled. If you would like to build crashpad,"
" please ensure depot_tools have been added to your system path. Install instructions are at: "
" https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up")
return()
endif()

# Google uses depot_tools to download and build crashpad. We will do the same.
Expand Down

0 comments on commit 86ff96b

Please sign in to comment.