Update date and version for 3.2.2 release
[platform/upstream/lapack.git] / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2 project(LAPACK Fortran)
3 if (UNIX)
4    if ( "${CMAKE_Fortran_COMPILER}" MATCHES "ifort" )
5   set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fltconsistency -fp_port" )
6    endif ()
7 endif ()
8 enable_testing()
9 include(CTest)
10 enable_testing()
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.")
20
21 set(SECOND_SRC  ${LAPACK_SOURCE_DIR}/INSTALL/second_${TIME_FUNC}.f)
22 set(DSECOND_SRC  ${LAPACK_SOURCE_DIR}/INSTALL/dsecnd_${TIME_FUNC}.f)
23
24 add_subdirectory(BLAS)
25 add_subdirectory(SRC)
26 add_subdirectory(TESTING)
27
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)
32 include(CPack)
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)