summaryrefslogtreecommitdiff
path: root/storage/oqgraph
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2016-05-03 15:23:34 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2016-05-03 15:23:34 +0200
commit67723e9618751e323ca161a0a31be56ebe1fab43 (patch)
treeb7cdc2aaece3503d37ffa0d167ba63d6965d7c0e /storage/oqgraph
parent673efd064831e99384b5ed2250c399678e4625a7 (diff)
downloadmariadb-git-67723e9618751e323ca161a0a31be56ebe1fab43.tar.gz
Move MYSQL_ADD_PLUGIN outside of IF(OQGRAPH_OK) condition,
otherwise the plugin does not get compiled if cmake is called multiple times.
Diffstat (limited to 'storage/oqgraph')
-rw-r--r--storage/oqgraph/CMakeLists.txt53
1 files changed, 28 insertions, 25 deletions
diff --git a/storage/oqgraph/CMakeLists.txt b/storage/oqgraph/CMakeLists.txt
index 772a8f61bd5..7dd96fbfc40 100644
--- a/storage/oqgraph/CMakeLists.txt
+++ b/storage/oqgraph/CMakeLists.txt
@@ -37,33 +37,36 @@ CHECK_CXX_SOURCE_COMPILES(
int main() { return 0; }
" OQGRAPH_OK)
ENDIF()
-
-IF(OQGRAPH_OK)
- ADD_DEFINITIONS(-DHAVE_OQGRAPH)
- IF(MSVC)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc" PARENT_SCOPE)
- # Fix problem with judy not finding inttypes.h on Windows:
- ADD_DEFINITIONS(-DJU_WIN)
- ELSE(MSVC)
- # Fix lp bug 1221555 with -fpermissive, so that errors in gcc 4.7 become warnings for the time being
- 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 -fno-strict-aliasing -fpermissive" PARENT_SCOPE)
- ENDIF(MSVC)
-
- ADD_DEFINITIONS(-DBOOST_NO_RTTI=1 -DBOOST_NO_TYPEID=1 -DBOOST_DISABLE_ASSERTS=1)
- MYSQL_ADD_PLUGIN(oqgraph ha_oqgraph.cc graphcore.cc graphcore-graph.cc
- oqgraph_shim.cc oqgraph_thunk.cc oqgraph_judy.cc
- STORAGE_ENGINE
- MODULE_ONLY
- RECOMPILE_FOR_EMBEDDED
- COMPONENT oqgraph-engine
- LINK_LIBRARIES ${Judy_LIBRARIES})
-ELSE(OQGRAPH_OK)
- MESSAGE(STATUS "Requisites for OQGraph not met. OQGraph will not be compiled")
-ENDIF(OQGRAPH_OK)
ENDFUNCTION()
IF(NOT DEFINED OQGRAPH_OK)
CHECK_OQGRAPH()
+ IF (NOT OQGRAPH_OK)
+ MESSAGE(STATUS "Requisites for OQGraph not met. OQGraph will not be compiled")
+ ENDIF()
+ENDIF()
+
+IF(NOT OQGRAPH_OK)
+ RETURN()
ENDIF()
+
+ADD_DEFINITIONS(-DHAVE_OQGRAPH)
+IF(MSVC)
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
+ # Fix problem with judy not finding inttypes.h on Windows:
+ ADD_DEFINITIONS(-DJU_WIN)
+ELSE(MSVC)
+ # Fix lp bug 1221555 with -fpermissive, so that errors in gcc 4.7 become warnings for the time being
+ 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 -fno-strict-aliasing -fpermissive" PARENT_SCOPE)
+ENDIF(MSVC)
+
+ADD_DEFINITIONS(-DBOOST_NO_RTTI=1 -DBOOST_NO_TYPEID=1 -DBOOST_DISABLE_ASSERTS=1)
+MYSQL_ADD_PLUGIN(oqgraph ha_oqgraph.cc graphcore.cc graphcore-graph.cc
+ oqgraph_shim.cc oqgraph_thunk.cc oqgraph_judy.cc
+ STORAGE_ENGINE
+ MODULE_ONLY
+ RECOMPILE_FOR_EMBEDDED
+ COMPONENT oqgraph-engine
+ LINK_LIBRARIES ${Judy_LIBRARIES})