From fcd29b78456a47b00763fe249bbee9456bfbf6bb Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Sun, 10 Apr 2011 22:48:28 -0700 Subject: [PATCH] Detect Boost installation and build OQGRAPH when possible. For now, disable oqgraph on x64 until LPBUG 756966 is solved. --- storage/oqgraph/CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/storage/oqgraph/CMakeLists.txt b/storage/oqgraph/CMakeLists.txt index d81dbe323b6..1eaec7ea028 100644 --- a/storage/oqgraph/CMakeLists.txt +++ b/storage/oqgraph/CMakeLists.txt @@ -13,6 +13,13 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +FIND_PACKAGE(Boost) + +IF(Boost_FOUND) + INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) + SET(CMAKE_REQUIRED_INCLUDES ${Boost_INCLUDE_DIRS}) +ENDIF() + INCLUDE (CheckCXXSourceCompiles) CHECK_CXX_SOURCE_COMPILES( "#include @@ -21,8 +28,9 @@ CHECK_CXX_SOURCE_COMPILES( #error oops #endif int main() { return 0; }" BOOST_OK) - -IF(BOOST_OK) + +# Only compile OQGRAPH on 32 bit, 64 bit does not compile yet (LPBUG 756966) +IF(BOOST_OK AND CMAKE_SIZEOF_VOID_P EQUAL 4) INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_OQGRAPH /EHsc")