Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
c356714d
Commit
c356714d
authored
Aug 31, 2021
by
Kartik Soneji
Committed by
Sergei Golubchik
Oct 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change Find*.cmake modules to match conventions
parent
9e32f229
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
65 additions
and
46 deletions
+65
-46
cmake/FindLIBAIO.cmake
cmake/FindLIBAIO.cmake
+2
-2
cmake/FindLZ4.cmake
cmake/FindLZ4.cmake
+3
-3
cmake/FindLZO.cmake
cmake/FindLZO.cmake
+9
-0
cmake/FindPMEM.cmake
cmake/FindPMEM.cmake
+3
-3
cmake/FindSnappy.cmake
cmake/FindSnappy.cmake
+9
-0
cmake/FindURING.cmake
cmake/FindURING.cmake
+3
-3
cmake/FindZSTD.cmake
cmake/FindZSTD.cmake
+4
-4
storage/maria/CMakeLists.txt
storage/maria/CMakeLists.txt
+1
-0
storage/oqgraph/cmake/FindJudy.cmake
storage/oqgraph/cmake/FindJudy.cmake
+9
-9
storage/rocksdb/build_rocksdb.cmake
storage/rocksdb/build_rocksdb.cmake
+19
-19
tpool/CMakeLists.txt
tpool/CMakeLists.txt
+3
-3
No files found.
cmake/FindLIBAIO.cmake
View file @
c356714d
find_path
(
LIBAIO_INCLUDE_DIR NAMES libaio.h
)
find_path
(
LIBAIO_INCLUDE_DIR
S
NAMES libaio.h
)
find_library
(
LIBAIO_LIBRARIES NAMES aio
)
include
(
FindPackageHandleStandardArgs
)
FIND_PACKAGE_HANDLE_STANDARD_ARGS
(
LIBAIO DEFAULT_MSG
LIBAIO_LIBRARIES LIBAIO_INCLUDE_DIR
)
LIBAIO_LIBRARIES LIBAIO_INCLUDE_DIR
S
)
cmake/FindLZ4.cmake
View file @
c356714d
find_path
(
LZ4_INCLUDE_DIR NAMES lz4.h
)
find_path
(
LZ4_INCLUDE_DIR
S
NAMES lz4.h
)
find_library
(
LZ4_LIBRARIES NAMES lz4
)
include
(
FindPackageHandleStandardArgs
)
FIND_PACKAGE_HANDLE_STANDARD_ARGS
(
LZ4 DEFAULT_MSG
LZ4_LIBRARIES LZ4_INCLUDE_DIR
)
LZ4_LIBRARIES LZ4_INCLUDE_DIR
S
)
mark_as_advanced
(
LZ4_INCLUDE_DIR LZ4_LIBRARIES
)
mark_as_advanced
(
LZ4_INCLUDE_DIR
S
LZ4_LIBRARIES
)
cmake/FindLZO.cmake
0 → 100644
View file @
c356714d
find_path
(
LZO_INCLUDE_DIRS NAMES lzo/lzo1x.h
)
find_library
(
LZO_LIBRARIES NAMES lzo2
)
include
(
FindPackageHandleStandardArgs
)
FIND_PACKAGE_HANDLE_STANDARD_ARGS
(
LZO DEFAULT_MSG
LZO_LIBRARIES LZO_INCLUDE_DIRS
)
mark_as_advanced
(
LZO_INCLUDE_DIRS LZO_LIBRARIES
)
cmake/FindPMEM.cmake
View file @
c356714d
...
...
@@ -7,12 +7,12 @@ if(DEFINED PMEM_LIBRARIES)
return
()
endif
()
find_path
(
PMEM_INCLUDE_DIR NAMES libpmem.h
)
find_path
(
PMEM_INCLUDE_DIR
S
NAMES libpmem.h
)
find_library
(
PMEM_LIBRARIES NAMES pmem
)
include
(
FindPackageHandleStandardArgs
)
FIND_PACKAGE_HANDLE_STANDARD_ARGS
(
PMEM DEFAULT_MSG
PMEM_LIBRARIES PMEM_INCLUDE_DIR
)
PMEM_LIBRARIES PMEM_INCLUDE_DIR
S
)
mark_as_advanced
(
PMEM_INCLUDE_DIR PMEM_LIBRARIES
)
mark_as_advanced
(
PMEM_INCLUDE_DIR
S
PMEM_LIBRARIES
)
cmake/FindSnappy.cmake
0 → 100644
View file @
c356714d
find_path
(
SNAPPY_INCLUDE_DIRS NAMES snappy.h
)
find_library
(
SNAPPY_LIBRARIES NAMES snappy
)
include
(
FindPackageHandleStandardArgs
)
FIND_PACKAGE_HANDLE_STANDARD_ARGS
(
Snappy DEFAULT_MSG
SNAPPY_LIBRARIES SNAPPY_INCLUDE_DIRS
)
mark_as_advanced
(
SNAPPY_INCLUDE_DIRS SNAPPY_LIBRARIES
)
cmake/FindURING.cmake
View file @
c356714d
find_path
(
URING_INCLUDE_DIR NAMES liburing.h
)
find_path
(
URING_INCLUDE_DIR
S
NAMES liburing.h
)
find_library
(
URING_LIBRARIES NAMES uring
)
include
(
FindPackageHandleStandardArgs
)
FIND_PACKAGE_HANDLE_STANDARD_ARGS
(
URING DEFAULT_MSG
URING_LIBRARIES URING_INCLUDE_DIR
)
URING_LIBRARIES URING_INCLUDE_DIR
S
)
mark_as_advanced
(
URING_INCLUDE_DIR URING_LIBRARIES
)
mark_as_advanced
(
URING_INCLUDE_DIR
S
URING_LIBRARIES
)
cmake/FindZSTD.cmake
View file @
c356714d
# - Find zstd
# Find the zstd compression library and includes
#
# ZSTD_INCLUDE_DIR - where to find zstd.h, etc.
# ZSTD_INCLUDE_DIR
S
- where to find zstd.h, etc.
# ZSTD_LIBRARIES - List of libraries when using zstd.
# ZSTD_FOUND - True if zstd found.
find_path
(
ZSTD_INCLUDE_DIR
find_path
(
ZSTD_INCLUDE_DIR
S
NAMES zstd.h
HINTS
${
ZSTD_ROOT_DIR
}
/include
)
...
...
@@ -14,8 +14,8 @@ find_library(ZSTD_LIBRARIES
HINTS
${
ZSTD_ROOT_DIR
}
/lib
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
ZSTD DEFAULT_MSG ZSTD_LIBRARIES ZSTD_INCLUDE_DIR
)
find_package_handle_standard_args
(
ZSTD DEFAULT_MSG ZSTD_LIBRARIES ZSTD_INCLUDE_DIR
S
)
mark_as_advanced
(
ZSTD_LIBRARIES
ZSTD_INCLUDE_DIR
)
ZSTD_INCLUDE_DIR
S
)
storage/maria/CMakeLists.txt
View file @
c356714d
...
...
@@ -122,6 +122,7 @@ IF(NOT PLUGIN_S3 STREQUAL NO)
ENDIF
()
IF
(
CURL_FOUND
)
INCLUDE_DIRECTORIES
(
${
CURL_INCLUDE_DIRS
}
)
LINK_DIRECTORIES
(
${
PC_CURL_LIBDIR
}
)
MYSQL_ADD_PLUGIN
(
s3 ha_s3.cc
${
S3_SOURCES
}
COMPONENT s3-engine
LINK_LIBRARIES curl z STORAGE_ENGINE NOT_EMBEDDED CONFIG s3.cnf
)
...
...
storage/oqgraph/cmake/FindJudy.cmake
View file @
c356714d
...
...
@@ -16,7 +16,7 @@
# Once done this will define
#
# Judy_FOUND - system has Judy
# Judy_INCLUDE_DIR - the Judy include directory
# Judy_INCLUDE_DIR
S
- the Judy include directory
# Judy_LIBRARIES - Link these to use Judy
# Judy_DEFINITIONS - Compiler switches required for using Judy
...
...
@@ -24,21 +24,21 @@ IF(MSVC)
# For now, assume Judy built according to the above instructions
if
(
NOT
"$ENV{JUDY_ROOT}"
STREQUAL
""
)
# Avoid passing backslashes to _Boost_FIND_LIBRARY due to macro re-parsing.
string
(
REPLACE
"
\\
"
"/"
Judy_INCLUDE_DIR_search $ENV{JUDY_ROOT}/src
)
string
(
REPLACE
"
\\
"
"/"
Judy_INCLUDE_DIR
S
_search $ENV{JUDY_ROOT}/src
)
string
(
REPLACE
"
\\
"
"/"
Judy_LIBRARIES_search $ENV{JUDY_ROOT}/src
)
endif
()
ELSE
(
MSVC
)
IF
(
Judy_INCLUDE_DIR AND Judy_LIBRARIES
)
IF
(
Judy_INCLUDE_DIR
S
AND Judy_LIBRARIES
)
SET
(
Judy_FIND_QUIETLY TRUE
)
ENDIF
(
Judy_INCLUDE_DIR AND Judy_LIBRARIES
)
ENDIF
(
Judy_INCLUDE_DIR
S
AND Judy_LIBRARIES
)
ENDIF
(
MSVC
)
FIND_PATH
(
Judy_INCLUDE_DIR
Judy.h PATHS
${
Judy_INCLUDE_DIR
_search
}
)
FIND_PATH
(
Judy_INCLUDE_DIR
S Judy.h PATHS
${
Judy_INCLUDE_DIRS
_search
}
)
FIND_LIBRARY
(
Judy_LIBRARIES Judy PATHS
${
Judy_LIBRARIES_search
}
)
IF
(
Judy_INCLUDE_DIR AND Judy_LIBRARIES
)
IF
(
Judy_INCLUDE_DIR
S
AND Judy_LIBRARIES
)
SET
(
Judy_FOUND TRUE
)
ELSE
(
Judy_INCLUDE_DIR AND Judy_LIBRARIES
)
ELSE
(
Judy_INCLUDE_DIR
S
AND Judy_LIBRARIES
)
SET
(
Judy_FOUND FALSE
)
if
(
MSVC
)
MESSAGE
(
STATUS
"How to build Judy on Windows:"
)
...
...
@@ -51,7 +51,7 @@ ELSE (Judy_INCLUDE_DIR AND Judy_LIBRARIES)
MESSAGE
(
STATUS
"3. Execute the command: 'build'"
)
MESSAGE
(
STATUS
"4. Rerun this cmake with the environment variable: 'set JUDY_ROOT=x:
\\
path
\\
to
\\
judy'"
)
endif
(
MSVC
)
ENDIF
(
Judy_INCLUDE_DIR AND Judy_LIBRARIES
)
ENDIF
(
Judy_INCLUDE_DIR
S
AND Judy_LIBRARIES
)
IF
(
Judy_FOUND
)
IF
(
NOT Judy_FIND_QUIETLY
)
...
...
@@ -63,5 +63,5 @@ ELSE (Judy_FOUND)
ENDIF
(
Judy_FIND_REQUIRED
)
ENDIF
(
Judy_FOUND
)
MARK_AS_ADVANCED
(
Judy_INCLUDE_DIR Judy_LIBRARIES
)
MARK_AS_ADVANCED
(
Judy_INCLUDE_DIR
S
Judy_LIBRARIES
)
storage/rocksdb/build_rocksdb.cmake
View file @
c356714d
...
...
@@ -35,48 +35,48 @@ endif()
# Optional compression libraries.
include
(
CheckFunctionExists
)
macro
(
check_lib package var
)
STRING
(
TOUPPER
${
package
}
PACKAGE_NAME
)
macro
(
check_lib package
)
SET
(
WITH_ROCKSDB_
${
package
}
AUTO CACHE STRING
"Build RocksDB with
${
package
}
compression. Possible values are 'ON', 'OFF', 'AUTO' and default is 'AUTO'"
)
STRING
(
TOUPPER
${
package
}
var
)
IF
(
NOT
${
WITH_ROCKSDB_
${
package
}}
STREQUAL
"OFF"
)
FIND_PACKAGE
(
${
package
}
QUIET
)
SET
(
HAVE_ROCKSDB_
${
PACKAGE_NAME
}
TRUE
)
IF
(
${${
PACKAGE_NAME
}
_FOUND
}
)
IF
(
${
ARGC
}
GREATER
2
)
SET
(
HAVE_ROCKSDB_
${
package
}
TRUE
)
IF
(
${${
package
}
_FOUND
}
)
IF
(
${
ARGC
}
GREATER
1
)
SET
(
CMAKE_REQUIRED_LIBRARIES
${${
var
}
_LIBRARIES
}
)
CHECK_FUNCTION_EXISTS
(
${
ARGV
2
}
${
var
}
_VALID
)
CHECK_FUNCTION_EXISTS
(
${
ARGV
1
}
${
package
}
_VALID
)
UNSET
(
CMAKE_REQUIRED_LIBRARIES
)
ELSE
()
SET
(
${
var
}
_VALID TRUE
)
SET
(
${
package
}
_VALID TRUE
)
ENDIF
()
ENDIF
()
ENDIF
()
ADD_FEATURE_INFO
(
ROCKSDB_
${
PACKAGE_NAME
}
HAVE_ROCKSDB_
${
PACKAGE_NAME
}
"
${
package
}
Compression in the RocksDB storage engine"
)
ADD_FEATURE_INFO
(
ROCKSDB_
${
package
}
HAVE_ROCKSDB_
${
package
}
"
${
package
}
Compression in the RocksDB storage engine"
)
IF
(
${${
var
}
_VALID
}
)
MESSAGE_ONCE
(
rocksdb_
${
var
}
"Found
${
package
}
:
${${
var
}
_LIBRARIES
}
"
)
add_definitions
(
-D
${
PACKAGE_NAME
}
)
IF
(
${${
package
}
_VALID
}
)
MESSAGE_ONCE
(
rocksdb_
${
package
}
"Found
${
package
}
:
${${
var
}
_LIBRARIES
}
"
)
add_definitions
(
-D
${
var
}
)
include_directories
(
${${
var
}
_INCLUDE_DIR
}
)
list
(
APPEND THIRDPARTY_LIBS
${${
var
}
_LIBRARIES
}
)
ELSEIF
(
${${
PACKAGE_NAME
}
_FOUND
}
)
MESSAGE_ONCE
(
rocksdb_
${
var
}
"Found unusable
${
package
}
:
${${
var
}
_LIBRARIES
}
[
${
ARGV2
}
]"
)
ELSEIF
(
${${
package
}
_FOUND
}
)
MESSAGE_ONCE
(
rocksdb_
${
package
}
"Found unusable
${
package
}
:
${${
var
}
_LIBRARIES
}
[
${
ARGV1
}
]"
)
ELSE
()
MESSAGE_ONCE
(
rocksdb_
${
var
}
"Could NOT find
${
package
}
"
)
MESSAGE_ONCE
(
rocksdb_
${
package
}
"Could NOT find
${
package
}
"
)
ENDIF
()
IF
(
${
WITH_ROCKSDB_
${
package
}}
STREQUAL
"ON"
AND NOT
${${
PACKAGE_NAME
}
_FOUND
}
)
IF
(
${
WITH_ROCKSDB_
${
package
}}
STREQUAL
"ON"
AND NOT
${${
package
}
_FOUND
}
)
MESSAGE
(
FATAL_ERROR
"
${
package
}
library was not found, but WITH_ROCKSDB_
${
package
}
option is ON.\
Either set WITH_ROCKSDB_
${
package
}
to OFF, or make sure
${
package
}
is installed"
)
endif
()
endmacro
()
check_lib
(
LZ4
LZ4
)
check_lib
(
BZip2
BZIP2
)
check_lib
(
snappy snappy
)
# rocksdb/cmake/modules/Findsnappy.cmake violates the convention
check_lib
(
ZSTD
ZSTD
ZDICT_trainFromBuffer
)
check_lib
(
LZ4
)
check_lib
(
BZip2
)
check_lib
(
Snappy
)
check_lib
(
ZSTD ZDICT_trainFromBuffer
)
add_definitions
(
-DZLIB
)
list
(
APPEND THIRDPARTY_LIBS
${
ZLIB_LIBRARY
}
)
...
...
tpool/CMakeLists.txt
View file @
c356714d
...
...
@@ -15,11 +15,11 @@ ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
SET
(
TPOOL_DEFINES
"-DHAVE_URING"
PARENT_SCOPE
)
ADD_DEFINITIONS
(
-DHAVE_URING
)
LINK_LIBRARIES
(
${
URING_LIBRARIES
}
)
INCLUDE_DIRECTORIES
(
${
URING_INCLUDE_DIR
}
)
INCLUDE_DIRECTORIES
(
${
URING_INCLUDE_DIR
S
}
)
SET
(
EXTRA_SOURCES aio_liburing.cc
)
SET
(
CMAKE_REQUIRED_INCLUDES_SAVE
${
CMAKE_REQUIRED_INCLUDES
}
)
SET
(
CMAKE_REQUIRED_LIBRARIES_SAVE
${
CMAKE_REQUIRED_LIBRARIES
}
)
SET
(
CMAKE_REQUIRED_INCLUDES
${
URING_INCLUDE_DIR
}
)
SET
(
CMAKE_REQUIRED_INCLUDES
${
URING_INCLUDE_DIR
S
}
)
SET
(
CMAKE_REQUIRED_LIBRARIES
${
URING_LIBRARIES
}
)
CHECK_SYMBOL_EXISTS
(
io_uring_mlock_size
"liburing.h"
HAVE_IO_URING_MLOCK_SIZE
)
SET
(
CMAKE_REQUIRED_INCLUDES
${
CMAKE_REQUIRED_INCLUDES_SAVE
}
)
...
...
@@ -32,7 +32,7 @@ ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
IF
(
LIBAIO_FOUND
)
SET
(
TPOOL_DEFINES
"-DLINUX_NATIVE_AIO"
PARENT_SCOPE
)
ADD_DEFINITIONS
(
-DLINUX_NATIVE_AIO
)
INCLUDE_DIRECTORIES
(
${
LIBAIO_INCLUDE_DIR
}
)
INCLUDE_DIRECTORIES
(
${
LIBAIO_INCLUDE_DIR
S
}
)
LINK_LIBRARIES
(
${
LIBAIO_LIBRARIES
}
)
SET
(
EXTRA_SOURCES aio_linux.cc
)
ENDIF
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment