]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
cmake: move boost tests
authorMatthew Barr <matthew.barr@intel.com>
Thu, 16 Mar 2017 22:25:03 +0000 (09:25 +1100)
committerMatthew Barr <matthew.barr@intel.com>
Wed, 26 Apr 2017 05:17:19 +0000 (15:17 +1000)
CMakeLists.txt
cmake/boost.cmake

index 0776e42cfa0bd27c4ab78f26ececb174b10bc7a7..d9bf171aca45b0b5bca523b27f4ecba1b92d96a5 100644 (file)
@@ -59,34 +59,6 @@ include_directories(${PROJECT_SOURCE_DIR}/src)
 include_directories(${PROJECT_BINARY_DIR})
 include_directories(SYSTEM include)
 
-set(BOOST_USE_STATIC_LIBS OFF)
-set(BOOST_USE_MULTITHREADED OFF)
-set(BOOST_USE_STATIC_RUNTIME OFF)
-if (CMAKE_SYSTEM_NAME MATCHES "Darwin"
-    OR (CMAKE_SYSTEM_NAME MATCHES "FreeBSD"
-        AND CMAKE_C_COMPILER_ID MATCHES "Clang"))
-    # we need a more recent boost for libc++ used by clang on OSX and FreeBSD
-    set(BOOST_MINVERSION 1.61.0)
-else ()
-    set(BOOST_MINVERSION 1.57.0)
-endif ()
-set(BOOST_NO_BOOST_CMAKE ON)
-
-unset(Boost_INCLUDE_DIR CACHE)
-# we might have boost in tree, so provide a hint and try again
-set(BOOST_INCLUDEDIR "${PROJECT_SOURCE_DIR}/include")
-find_package(Boost ${BOOST_MINVERSION} QUIET)
-if(NOT Boost_FOUND)
-    # otherwise check for Boost installed on the system
-    unset(BOOST_INCLUDEDIR)
-    find_package(Boost ${BOOST_MINVERSION} QUIET)
-    if(NOT Boost_FOUND)
-        message(FATAL_ERROR "Boost ${BOOST_MINVERSION} or later not found. Either install system packages if available, extract Boost headers to ${CMAKE_SOURCE_DIR}/include, or set the CMake BOOST_ROOT variable.")
-    endif()
-endif()
-
-message(STATUS "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
-
 include (${CMAKE_MODULE_PATH}/boost.cmake)
 
 # -- make this work? set(python_ADDITIONAL_VERSIONS 2.7 2.6)
index b7fda4214735bdc0545fdeafdadaeeedd59fa953..ff4e2f94175b6adfbca4f2abc01a29adfa52d08a 100644 (file)
@@ -1,3 +1,33 @@
+# Various checks related to Boost
+
+set(BOOST_USE_STATIC_LIBS OFF)
+set(BOOST_USE_MULTITHREADED OFF)
+set(BOOST_USE_STATIC_RUNTIME OFF)
+if (CMAKE_SYSTEM_NAME MATCHES "Darwin"
+    OR (CMAKE_SYSTEM_NAME MATCHES "FreeBSD"
+        AND CMAKE_C_COMPILER_ID MATCHES "Clang"))
+    # we need a more recent boost for libc++ used by clang on OSX and FreeBSD
+    set(BOOST_MINVERSION 1.61.0)
+else ()
+    set(BOOST_MINVERSION 1.57.0)
+endif ()
+set(BOOST_NO_BOOST_CMAKE ON)
+
+unset(Boost_INCLUDE_DIR CACHE)
+# we might have boost in tree, so provide a hint and try again
+set(BOOST_INCLUDEDIR "${PROJECT_SOURCE_DIR}/include")
+find_package(Boost ${BOOST_MINVERSION} QUIET)
+if(NOT Boost_FOUND)
+    # otherwise check for Boost installed on the system
+    unset(BOOST_INCLUDEDIR)
+    find_package(Boost ${BOOST_MINVERSION} QUIET)
+    if(NOT Boost_FOUND)
+        message(FATAL_ERROR "Boost ${BOOST_MINVERSION} or later not found. Either install system packages if available, extract Boost headers to ${CMAKE_SOURCE_DIR}/include, or set the CMake BOOST_ROOT variable.")
+    endif()
+endif()
+
+message(STATUS "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
+
 # Boost 1.62 has a bug that we've patched around, check if it is required
 if (Boost_VERSION EQUAL 106200)
     set (CMAKE_REQUIRED_INCLUDES ${BOOST_INCLUDEDIR} "${PROJECT_SOURCE_DIR}/include")