summaryrefslogtreecommitdiff
path: root/sql/CMakeLists.txt
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2019-04-18 05:50:59 +0100
committerVladislav Vaintroub <wlad@mariadb.com>2019-04-18 07:37:05 +0100
commit6812fb7971a247592358f36ee8ae23dfea565a36 (patch)
treebdc81c3d3a57d82de08eb17d7542b97d16b8db1e /sql/CMakeLists.txt
parent59ed5f3aa4bc5a02a65f93b1d054ccc0fb2cd248 (diff)
downloadmariadb-git-6812fb7971a247592358f36ee8ae23dfea565a36.tar.gz
MDEV-19274 mariadb does not build on OSes that do not have HAVE_POOL_OF_THREADSbb-10.4-aix-build-fix
Do not try to compile threadpool_common.cc, if threadpool is not available on current OS. Also introduced undocumented/uncached CMake variable DISABLE_THREADPOOL, to emulate builds on exotic OSes.
Diffstat (limited to 'sql/CMakeLists.txt')
-rw-r--r--sql/CMakeLists.txt16
1 files changed, 10 insertions, 6 deletions
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index ecca723b9e4..da4de86d950 100644
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -126,7 +126,7 @@ SET (SQL_SOURCE
opt_index_cond_pushdown.cc opt_subselect.cc
opt_table_elimination.cc sql_expression_cache.cc
gcalc_slicescan.cc gcalc_tools.cc
- threadpool_common.cc ../sql-common/mysql_async.c
+ ../sql-common/mysql_async.c
my_apc.cc mf_iocache_encr.cc item_jsonfunc.cc
my_json_writer.cc
rpl_gtid.cc rpl_parallel.cc
@@ -152,17 +152,21 @@ SET (SQL_SOURCE
${MYSYS_LIBWRAP_SOURCE}
)
-IF (CMAKE_SYSTEM_NAME MATCHES "Linux" OR
- CMAKE_SYSTEM_NAME MATCHES "Windows" OR
- CMAKE_SYSTEM_NAME MATCHES "SunOS" OR
- HAVE_KQUEUE)
+IF ((CMAKE_SYSTEM_NAME MATCHES "Linux" OR
+ CMAKE_SYSTEM_NAME MATCHES "SunOS" OR
+ WIN32 OR
+ HAVE_KQUEUE)
+ AND (NOT DISABLE_THREADPOOL))
ADD_DEFINITIONS(-DHAVE_POOL_OF_THREADS)
IF(WIN32)
SET(SQL_SOURCE ${SQL_SOURCE} threadpool_win.cc)
- SET(SQL_SOURCE ${SQL_SOURCE} handle_connections_win.cc)
ENDIF()
SET(SQL_SOURCE ${SQL_SOURCE} threadpool_generic.cc)
+ SET(SQL_SOURCE ${SQL_SOURCE} threadpool_common.cc)
+ENDIF()
+IF(WIN32)
+ SET(SQL_SOURCE ${SQL_SOURCE} handle_connections_win.cc)
ENDIF()
MYSQL_ADD_PLUGIN(partition ha_partition.cc STORAGE_ENGINE DEFAULT STATIC_ONLY