diff --git a/cmake/modules/FindEigen3.cmake b/cmake/modules/FindEigen3.cmake deleted file mode 100644 index ca61665e8e..0000000000 --- a/cmake/modules/FindEigen3.cmake +++ /dev/null @@ -1,81 +0,0 @@ -# - Try to find Eigen3 lib -# -# This module supports requiring a minimum version, e.g. you can do -# find_package(Eigen3 3.1.2) -# to require version 3.1.2 or newer of Eigen3. -# -# Once done this will define -# -# EIGEN3_FOUND - system has eigen lib with correct version -# EIGEN3_INCLUDE_DIR - the eigen include directory -# EIGEN3_VERSION - eigen version - -# Copyright (c) 2006, 2007 Montel Laurent, -# Copyright (c) 2008, 2009 Gael Guennebaud, -# Copyright (c) 2009 Benoit Jacob -# Redistribution and use is allowed according to the terms of the 2-clause BSD license. - -if(NOT Eigen3_FIND_VERSION) - if(NOT Eigen3_FIND_VERSION_MAJOR) - set(Eigen3_FIND_VERSION_MAJOR 2) - endif() - if(NOT Eigen3_FIND_VERSION_MINOR) - set(Eigen3_FIND_VERSION_MINOR 91) - endif() - if(NOT Eigen3_FIND_VERSION_PATCH) - set(Eigen3_FIND_VERSION_PATCH 0) - endif() - - set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}") -endif() - -macro(_eigen3_check_version) - file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header) - - string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}") - set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}") - string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}") - set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}") - string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}") - set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}") - - set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION}) - if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION}) - set(EIGEN3_VERSION_OK FALSE) - else() - set(EIGEN3_VERSION_OK TRUE) - endif() - - if(NOT EIGEN3_VERSION_OK) - - message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, " - "but at least version ${Eigen3_FIND_VERSION} is required") - endif() -endmacro(_eigen3_check_version) - -if (EIGEN3_INCLUDE_DIR) - - # in cache already - _eigen3_check_version() - set(EIGEN3_FOUND ${EIGEN3_VERSION_OK}) - -else () - - find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library - PATHS - ${CMAKE_INSTALL_PREFIX}/include - ${KDE4_INCLUDE_DIR} - PATH_SUFFIXES eigen3 eigen - ) - - if(EIGEN3_INCLUDE_DIR) - _eigen3_check_version() - endif() - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK) - - mark_as_advanced(EIGEN3_INCLUDE_DIR) - -endif() - diff --git a/cmake/modules/FindGSL.cmake b/cmake/modules/FindGSL.cmake deleted file mode 100644 index 36c9dda7a2..0000000000 --- a/cmake/modules/FindGSL.cmake +++ /dev/null @@ -1,81 +0,0 @@ -# - Find GSL -# Find the GNU Scientific Library (GSL) includes and library -# -# This module defines -# GSL_FOUND -# GSL_LIBRARIES -# GSL_CBLAS_LIBRARIES -# GSL_INCLUDE_DIR -# GSL_VERSION -# - -include(UsePkgConfig) - -if (GSL_INCLUDE_DIR AND GSL_LIBRARIES AND GSL_CBLAS_LIBRARIES AND GSL_VERSION) - - # Already in cache - SET(GSL_FOUND TRUE) - -else () - - FIND_LIBRARY (GSL_LIBRARIES gsl) - - FIND_LIBRARY (GSL_CBLAS_LIBRARIES gslcblas) - - FIND_PATH (GSL_INCLUDE_DIR gsl_multimin.h - /usr/include - /usr/local/include - ${CMAKE_INCLUDE_PATH} - PATH_SUFFIXES gsl - ) - - if (NOT WIN32) - FIND_PROGRAM (GSL_CONFIG gsl-config) - - IF (GSL_CONFIG) - EXEC_PROGRAM (${GSL_CONFIG} ARGS "--version" OUTPUT_VARIABLE gsl_version) - # EXEC_PROGRAM (${GSL_CONFIG} ARGS "--cflags" OUTPUT_VARIABLE gsl_include_dir) - # EXEC_PROGRAM (${GSL_CONFIG} ARGS "--libs" OUTPUT_VARIABLE gsl_libraries) - - # STRING (REGEX REPLACE "-I([^ ]*)" "\\1" GSL_INCLUDE_DIR "${gsl_include_dir}") - # STRING (REGEX REPLACE "-L([^ ]*)" "\\1" GSL_LIBRARIES "${gsl_libraries}") - SET (GSL_VERSION ${gsl_version} CACHE STRING "GNU Scientific Library Version") - # TODO check version! 1.6 suffices? - ENDIF (GSL_CONFIG) - else () - file(STRINGS ${GSL_INCLUDE_DIR}/gsl_version.h gsl_version REGEX "^#define GSL_VERSION \"(.+)\"$") - string(REGEX REPLACE "^#define GSL_VERSION \"(.+)\"$" "\\1" gsl_version "${gsl_version}") - SET (GSL_VERSION ${gsl_version} CACHE STRING "GNU Scientific Library Version") - endif () - - IF (NOT GSL_INCLUDE_DIR OR NOT GSL_VERSION) - # Try pkg-config instead, but only for the - # include directory, since we really need - # the *LIBRARIES to point to the actual .so's. - PKGCONFIG(gsl GSL_INCLUDE_DIR dummy dummy dummy) - ENDIF (NOT GSL_INCLUDE_DIR OR NOT GSL_VERSION) - # - # everything necessary found? - # - IF (GSL_LIBRARIES AND GSL_CBLAS_LIBRARIES AND GSL_INCLUDE_DIR) - SET (GSL_FOUND TRUE) - ELSE (GSL_LIBRARIES AND GSL_CBLAS_LIBRARIES AND GSL_INCLUDE_DIR) - SET (GSL_FOUND FALSE) - ENDIF (GSL_LIBRARIES AND GSL_CBLAS_LIBRARIES AND GSL_INCLUDE_DIR) - -endif () - - -# -# output status -# -if (GSL_FOUND) - if (NOT GSL_FIND_QUIETLY) - MESSAGE (STATUS "Found GNU Scientific Library ${GSL_VERSION}: ${GSL_INCLUDE_DIR} ${GSL_LIBRARIES};${GSL_CBLAS_LIBRARIES}") - endif() -else () - if (GSL_FIND_REQUIRED) - MESSAGE (FATAL_ERROR "Required package gsl NOT found") - endif () -endif () -