-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
41 lines (34 loc) · 1.27 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
SET(MUTEXTYPE "event" CACHE STRING "Mutex type: event, sys or futex")
IF(MY_COMPILER_IS_GNU)
IF (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
INCLUDE(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-fno-builtin-memcmp" HAVE_NO_BUILTIN_MEMCMP)
IF (HAVE_NO_BUILTIN_MEMCMP)
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/rem/rem0cmp.cc
PROPERTIES COMPILE_FLAGS -fno-builtin-memcmp)
ENDIF()
ENDIF()
ENDIF()
IF(MY_COMPILER_IS_GNU_OR_CLANG)
STRING_APPEND(CMAKE_CXX_FLAGS " -Wno-unused-parameter")
STRING_APPEND(CMAKE_CXX_FLAGS " -Wno-cast-qual")
ENDIF()
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DUNIV_DEBUG")
IF(HAVE_IB_ATOMIC_PTHREAD_T_GCC)
ADD_DEFINITIONS(-DHAVE_IB_ATOMIC_PTHREAD_T_GCC=1)
ENDIF()
IF(MUTEXTYPE MATCHES "event")
ADD_DEFINITIONS(-DMUTEX_EVENT)
ELSEIF(MUTEXTYPE MATCHES "futex" AND DEFINED HAVE_IB_LINUX_FUTEX)
ADD_DEFINITIONS(-DMUTEX_FUTEX)
ELSE()
ADD_DEFINITIONS(-DMUTEX_SYS)
ENDIF()
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/storage/innobase
${CMAKE_SOURCE_DIR}/storage/innobase/include
${CMAKE_SOURCE_DIR}/storage/innobase/handler
)
MYSQL_ADD_PLUGIN(innodb_buffer_page_underuse innodb_buffer_page_underuse.cc
MODULE_ONLY MODULE_OUTPUT_NAME "innodb_buffer_page_underuse")