diff options
Diffstat (limited to 'storage/oqgraph/CMakeLists.txt')
-rw-r--r-- | storage/oqgraph/CMakeLists.txt | 49 |
1 files changed, 27 insertions, 22 deletions
diff --git a/storage/oqgraph/CMakeLists.txt b/storage/oqgraph/CMakeLists.txt index caba9ce3481..c791081d4ca 100644 --- a/storage/oqgraph/CMakeLists.txt +++ b/storage/oqgraph/CMakeLists.txt @@ -1,22 +1,27 @@ -CHECK_CXX_SOURCE_COMPILES(
-"#include <boost/version.hpp>
-#if BOOST_VERSION >= 104000
-#else
-#error oops
-#endif
-int main() { return 0; }" BOOST_OK)
-
-IF(BOOST_OK)
- ADD_DEFINITIONS(-DHAVE_OQGRAPH)
- IF(MSVC)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
- ENDIF(MSVC)
- IF(CMAKE_CXX_FLAGS)
- STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
- STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
- ENDIF()
-
- MYSQL_ADD_PLUGIN(oqgraph ha_oqgraph.cc graphcore.cc STORAGE_ENGINE
- MODULE_ONLY)
-ENDIF(BOOST_OK)
+CHECK_CXX_SOURCE_COMPILES( +"#include <boost/version.hpp> +#if BOOST_VERSION >= 104000 +#else +#error oops +#endif +int main() { return 0; }" BOOST_OK) + +# lp:756966 OQGRAPH on Win64 does not compile +IF(MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8) + SET(BOOST_OK 0) +ENDIF() + +IF(BOOST_OK) + ADD_DEFINITIONS(-DHAVE_OQGRAPH) + IF(MSVC) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc") + ENDIF(MSVC) + IF(CMAKE_CXX_FLAGS) + STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) + STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated") + ENDIF() + + MYSQL_ADD_PLUGIN(oqgraph ha_oqgraph.cc graphcore.cc STORAGE_ENGINE + MODULE_ONLY) +ENDIF(BOOST_OK) |