aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-02-28 16:55:30 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-02-28 16:55:30 +0300
commita416bd196ecff50852933f545a8f6457799a707f (patch)
tree9761b02ab73b64a19e8f6499bc6b5dd3f8c41c00
parent6e4acf929becf5890e533653404e8b74d60983c3 (diff)
downloadydb-a416bd196ecff50852933f545a8f6457799a707f.tar.gz
intermediate changes
ref:65be1d4bd0b0b3c37fd5f3deaccd3714a989632f
-rw-r--r--CMakeLists.txt1
-rw-r--r--build/ya.conf.json2
-rw-r--r--cmake/FindAIO.cmake26
3 files changed, 28 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 73b076df71..8494012841 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -108,6 +108,7 @@ set(CMAKE_CXX_FLAGS "\
list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/cmake)
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
enable_testing()
+include(cmake/FindAIO.cmake)
include(cmake/antlr.cmake)
include(cmake/bison.cmake)
include(cmake/conan.cmake)
diff --git a/build/ya.conf.json b/build/ya.conf.json
index 95fb47e071..9d4805490b 100644
--- a/build/ya.conf.json
+++ b/build/ya.conf.json
@@ -7640,7 +7640,7 @@
},
"saas2": {
"formula": {
- "sandbox_id": 1222768210,
+ "sandbox_id": 1229425647,
"match": "saas2"
},
"executable": {
diff --git a/cmake/FindAIO.cmake b/cmake/FindAIO.cmake
new file mode 100644
index 0000000000..a9d7d87b55
--- /dev/null
+++ b/cmake/FindAIO.cmake
@@ -0,0 +1,26 @@
+# - Find AIO
+#
+# AIO_INCLUDE - Where to find libaio.h
+# AIO_LIBS - List of libraries when using AIO.
+# AIO_FOUND - True if AIO found.
+
+find_path(AIO_INCLUDE_DIR
+ libaio.h
+ HINTS $ENV{AIO_ROOT}/include)
+
+find_library(AIO_LIBRARIES
+ aio
+ HINTS $ENV{AIO_ROOT}/lib)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(AIO DEFAULT_MSG AIO_LIBRARIES AIO_INCLUDE_DIR)
+
+mark_as_advanced(AIO_INCLUDE_DIR AIO_LIBRARIES)
+
+if (AIO_FOUND AND NOT TARGET AIO::aio)
+ add_library(AIO::aio UNKNOWN IMPORTED)
+ set_target_properties(AIO::aio PROPERTIES
+ IMPORTED_LOCATION ${AIO_LIBRARIES}
+ INTERFACE_INCLUDE_DIRECTORIES ${AIO_INCLUDE_DIR}
+ )
+endif()