1 cmake_minimum_required(VERSION 2.6)
2 project(LAPACK Fortran)
4 if ( "${CMAKE_Fortran_COMPILER}" MATCHES "ifort" )
5 set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fltconsistency -fp_port" )
11 set(CMAKE_MODULE_PATH ${LAPACK_SOURCE_DIR} ${CMAKE_MODULE_PATH})
12 include(CheckTimeFunction)
13 set(TIME_FUNC NONE ${TIME_FUNC})
14 CHECK_TIME_FUNCTION(NONE TIME_FUNC)
15 CHECK_TIME_FUNCTION(INT_CPU_TIME TIME_FUNC)
16 CHECK_TIME_FUNCTION(EXT_ETIME TIME_FUNC)
17 CHECK_TIME_FUNCTION(EXT_ETIME_ TIME_FUNC)
18 CHECK_TIME_FUNCTION(INT_ETIME TIME_FUNC)
19 message(STATUS "--> Will use second_${TIME_FUNC}.f and dsecnd_${TIME_FUNC}.f as timing function.")
21 set(SECOND_SRC ${LAPACK_SOURCE_DIR}/INSTALL/second_${TIME_FUNC}.f)
22 set(DSECOND_SRC ${LAPACK_SOURCE_DIR}/INSTALL/dsecnd_${TIME_FUNC}.f)
24 add_subdirectory(BLAS)
26 add_subdirectory(TESTING)
28 set(LAPACK_VERSION 3.2.2)
29 set(CPACK_PACKAGE_VERSION_MAJOR 3)
30 set(CPACK_PACKAGE_VERSION_MINOR 2)
31 set(CPACK_PACKAGE_VERSION_PATCH 2)
33 export(TARGETS blas lapack FILE lapack-targets.cmake)
34 configure_file(${LAPACK_SOURCE_DIR}/lapack-config-version.cmake.in
35 ${LAPACK_BINARY_DIR}/lapack-config-version.cmake @ONLY)
36 configure_file(${LAPACK_SOURCE_DIR}/lapack-config.cmake.in
37 ${LAPACK_BINARY_DIR}/lapack-config.cmake @ONLY)