From 4fdcaa6aeaca1077fd2f3acced329e9703e72c7b Mon Sep 17 00:00:00 2001 From: Przemyslaw Skibinski Date: Wed, 4 Dec 2024 11:48:20 +0100 Subject: [PATCH] PS-9533: Introduce cmake option to enable probuilds Add `WITH_PERCONA_PROBUILD` cmake option that enables pro features. The`PRO_BUILD` cmake option is an alias for `WITH_PERCONA_PROBUILD`. From source code we have to use `#ifdef HAVE_PERCONA_PROBUILD` for pro features. --- CMakeLists.txt | 3 +++ config.h.cmake | 1 + configure.cmake | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6fbd51dc2354..bad9844d65ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2225,6 +2225,9 @@ ENDIF() option(WITH_PERCONA_TELEMETRY "Build Percona Telemetry component" OFF) +option(WITH_PERCONA_PROBUILD "Build Percona Server Pro variant" OFF) +option(PROBUILD "Build Percona Server Pro variant (an alias for WITH_PERCONA_PROBUILD)" OFF) + # Utility target to build every executable tagged with ADD_TEST. ADD_CUSTOM_TARGET(unittest_all) diff --git a/config.h.cmake b/config.h.cmake index 35def230d3b8..9dbb0b16fce8 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -178,6 +178,7 @@ #cmakedefine HAVE_GCC_SYNC_BUILTINS 1 #cmakedefine HAVE_VALGRIND #cmakedefine HAVE_PERCONA_TELEMETRY +#cmakedefine HAVE_PERCONA_PROBUILD #cmakedefine HAVE_SYS_GETTID 1 #cmakedefine HAVE_PTHREAD_GETTHREADID_NP 1 #cmakedefine HAVE_PTHREAD_THREADID_NP 1 diff --git a/configure.cmake b/configure.cmake index c21c40d1b8db..567f56568f72 100644 --- a/configure.cmake +++ b/configure.cmake @@ -556,6 +556,11 @@ IF(WITH_PERCONA_TELEMETRY) SET(HAVE_PERCONA_TELEMETRY 1) ENDIF() +IF(WITH_PERCONA_PROBUILD OR PROBUILD) + SET(MYSQL_SERVER_SUFFIX "-pro") + SET(HAVE_PERCONA_PROBUILD 1) +ENDIF() + # Check for gettid() system call CHECK_C_SOURCE_COMPILES(" #include