diff options
author | Kefu Chai <kchai@redhat.com> | 2017-10-31 10:39:02 +0100 |
---|---|---|
committer | Kefu Chai <kchai@redhat.com> | 2017-10-31 10:39:09 +0100 |
commit | 70b5b4bfbf078d65331a58f1e7d152c5e1738a30 (patch) | |
tree | 88b878023fc9ee0e9bd7405970126e14286b4b08 /cmake/modules/BuildRocksDB.cmake | |
parent | cmake: should use the value of GPERFTOOLS_LIBRARIES as REQUIRED_VARS (diff) | |
download | ceph-70b5b4bfbf078d65331a58f1e7d152c5e1738a30.tar.xz ceph-70b5b4bfbf078d65331a58f1e7d152c5e1738a30.zip |
cmake: should check the availability of aligned_alloc() by running the test
this mimics the failure of rocksdb without a working
aligned_alloc()/free().
Signed-off-by: Kefu Chai <kchai@redhat.com>
Diffstat (limited to 'cmake/modules/BuildRocksDB.cmake')
-rw-r--r-- | cmake/modules/BuildRocksDB.cmake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmake/modules/BuildRocksDB.cmake b/cmake/modules/BuildRocksDB.cmake index da6e18d04e0..d62f7458058 100644 --- a/cmake/modules/BuildRocksDB.cmake +++ b/cmake/modules/BuildRocksDB.cmake @@ -1,4 +1,4 @@ -include(CheckCXXSourceCompiles) +include(CheckCXXSourceRuns) function(do_build_rocksdb) set(ROCKSDB_CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON) @@ -42,13 +42,13 @@ endfunction() function(check_aligned_alloc) set(SAVE_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) - set(CMAKE_REQUIRED_FLAGS "-std=c++11 -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -nostdlib") + set(CMAKE_REQUIRED_FLAGS "-std=c++11 -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free") if(LINUX) set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -D_GNU_SOURCE") endif() set(SAVE_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}) set(CMAKE_REQUIRED_LIBRARIES ${GPERFTOOLS_TCMALLOC_LIBRARY}) - CHECK_CXX_SOURCE_COMPILES(" + CHECK_CXX_SOURCE_RUNS(" #include <stdlib.h> int main() |