Commit 6fdfb75a authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Replace FOLLY_HAVE_LINUX_MEMBARRIER_H with __has_include

Summary:
[Folly] Replace `FOLLY_HAVE_LINUX_MEMBARRIER_H` with `__has_include`.

Now that folly only targets which support `__has_include`.

Reviewed By: Orvid

Differential Revision: D9279852

fbshipit-source-id: 94c446a2d6e2662d32a7899ab470679da6da8e0e
parent b7a40a73
......@@ -9,7 +9,6 @@ include(CheckCXXCompilerFlag)
CHECK_INCLUDE_FILE_CXX(malloc.h FOLLY_HAVE_MALLOC_H)
CHECK_INCLUDE_FILE_CXX(bits/c++config.h FOLLY_HAVE_BITS_CXXCONFIG_H)
CHECK_INCLUDE_FILE_CXX(features.h FOLLY_HAVE_FEATURES_H)
CHECK_INCLUDE_FILE_CXX(linux/membarrier.h FOLLY_HAVE_LINUX_MEMBARRIER_H)
CHECK_INCLUDE_FILE_CXX(jemalloc/jemalloc.h FOLLY_USE_JEMALLOC)
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
......
......@@ -38,7 +38,6 @@
#cmakedefine FOLLY_HAVE_MALLOC_H 1
#cmakedefine FOLLY_HAVE_BITS_CXXCONFIG_H 1
#cmakedefine FOLLY_HAVE_FEATURES_H 1
#cmakedefine FOLLY_HAVE_LINUX_MEMBARRIER_H 1
#cmakedefine FOLLY_USE_JEMALLOC 1
#if FOLLY_HAVE_FEATURES_H
......
......@@ -27,7 +27,7 @@
#if !defined(__NR_membarrier)
#define __NR_membarrier 324
#endif
#if FOLLY_HAVE_LINUX_MEMBARRIER_H
#if __has_include(<linux/membarrier.h>)
#include <linux/membarrier.h> // @manual
#else
#define MEMBARRIER_CMD_QUERY 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment