summaryrefslogtreecommitdiffstats
path: root/indexlib/ConfigureChecks.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indexlib/ConfigureChecks.cmake')
-rw-r--r--indexlib/ConfigureChecks.cmake24
1 files changed, 24 insertions, 0 deletions
diff --git a/indexlib/ConfigureChecks.cmake b/indexlib/ConfigureChecks.cmake
new file mode 100644
index 000000000..77664377f
--- /dev/null
+++ b/indexlib/ConfigureChecks.cmake
@@ -0,0 +1,24 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+include( CheckIncludeFileCXX )
+
+tde_save( CMAKE_CXX_FLAGS CMAKE_REQUIRED_INCLUDES )
+unset( CMAKE_CXX_FLAGS )
+set( CMAKE_REQUIRED_INCLUDES ${BOOST_INCLUDE_DIR} )
+
+check_include_file_cxx( "boost/format.hpp" HAVE_BOOST )
+
+if( NOT HAVE_BOOST )
+ tde_message_fatal( "boost library is required, but was not found on your system.\n Try to set boost include dir to BOOST_INCLUDE_DIR." )
+endif( )
+
+tde_restore( CMAKE_CXX_FLAGS CMAKE_REQUIRED_INCLUDES )