]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cmake: use cmake_dependent_option for WITH_BREAKPAD
authorCasey Bodley <cbodley@redhat.com>
Fri, 7 Nov 2025 14:17:47 +0000 (09:17 -0500)
committerCasey Bodley <cbodley@redhat.com>
Tue, 25 Nov 2025 14:55:35 +0000 (09:55 -0500)
a bit simpler without the WITH_BREAKPAD_DEFAULT part, and causes the
WITH_BREAKPAD option to be hidden from cmake-gui on WIN32

Signed-off-by: Casey Bodley <cbodley@redhat.com>
CMakeLists.txt

index b7c7bbdf4f7af30709b1123a5b801627232e8f7d..58457e0ee429a4deccae8ccdf046e3d9d6cc03cc 100644 (file)
@@ -538,13 +538,9 @@ if(WITH_CATCH2)
   message("-- Enabled Catch2 support")
 endif()
 
-if(WIN32)
-    set(WITH_BREAKPAD_DEFAULT OFF)
-else()
-    set(WITH_BREAKPAD_DEFAULT ON)
-endif()
-
-option(WITH_BREAKPAD "Build with Google Breakpad crash reporter"  ${WITH_BREAKPAD_DEFAULT})
+# enable breakpad unless win32
+CMAKE_DEPENDENT_OPTION(WITH_BREAKPAD "Build with Google Breakpad crash reporter" OFF
+  "WIN32" ON)
 if(WITH_BREAKPAD)
   set(HAVE_BREAKPAD ON)
   message("-- Enabled Google Breakpad crash reporter")