summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorRich Prohaska <prohaska@tokutek.com>2013-09-26 12:05:54 -0400
committerRich Prohaska <prohaska@tokutek.com>2013-09-26 12:05:54 -0400
commit3152434eeb27afd6ea0e39cf8c8fab09c1137534 (patch)
treed5cead5749f1fcdff91a3e47ba2b459e8391b7d3 /storage
parent9e67557d89512523ab3f5b46a59d5989ca56b37d (diff)
downloadmariadb-git-3152434eeb27afd6ea0e39cf8c8fab09c1137534.tar.gz
#92 add compiler and cmake checks from mariadb
Diffstat (limited to 'storage')
-rw-r--r--storage/tokudb/CMakeLists.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/storage/tokudb/CMakeLists.txt b/storage/tokudb/CMakeLists.txt
index 15ed330c014..d1068e9c3d0 100644
--- a/storage/tokudb/CMakeLists.txt
+++ b/storage/tokudb/CMakeLists.txt
@@ -1,3 +1,19 @@
+# ft-index only supports x86-64 and cmake-2.8.9+
+IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND
+ NOT CMAKE_VERSION VERSION_LESS "2.8.9" AND
+ NOT WITHOUT_TOKUDB AND NOT WITHOUT_TOKUDB_STORAGE_ENGINE)
+CHECK_CXX_SOURCE_COMPILES(
+"
+struct a {int b; int c; };
+struct a d = { .b=1, .c=2 };
+int main() { return 0; }
+" TOKUDB_OK)
+ENDIF()
+
+IF(NOT TOKUDB_OK)
+ RETURN()
+ENDIF()
+
IF(DEFINED ENV{TOKUDB_VERSION})
SET(TOKUDB_VERSION $ENV{TOKUDB_VERSION})
ADD_DEFINITIONS("-DTOKUDB_VERSION=\"${TOKUDB_VERSION}\"")