forked from NIRALUser/CLAPACK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
37 lines (34 loc) · 1.2 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
cmake_minimum_required(VERSION 2.6)
project(CLAPACK C)
if(WIN32 AND NOT CYGWIN)
set(SECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/winsecond.c)
set(DSECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/windsecnd.c)
add_definitions(-DNO_ISATTY -DMSDOS -DUSE_CLOCK)
else()
set(SECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/second.c)
set(DSECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/dsecnd.c)
endif()
option(USE_BLAS_WRAP "pre-pend f2c_ to each function in blas" OFF)
if(NOT USE_BLAS_WRAP)
# _zrotg_ seems to be missing in the wrap header
add_definitions(-DNO_BLAS_WRAP)
endif()
include_directories(${CLAPACK_SOURCE_DIR}/INCLUDE)
add_subdirectory(F2CLIBS)
add_subdirectory(BLAS)
add_subdirectory(SRC)
if( BUILD_TESTING )
enable_testing()
include(CTest)
add_subdirectory(TESTING)
endif()
set(CLAPACK_VERSION 3.2.1)
set(CPACK_PACKAGE_VERSION_MAJOR 3)
set(CPACK_PACKAGE_VERSION_MINOR 2)
set(CPACK_PACKAGE_VERSION_PATCH 1)
include(CPack)
export(TARGETS f2c blas lapack FILE clapack-targets.cmake)
configure_file(${CLAPACK_SOURCE_DIR}/clapack-config-version.cmake.in
${CLAPACK_BINARY_DIR}/clapack-config-version.cmake @ONLY)
configure_file(${CLAPACK_SOURCE_DIR}/clapack-config.cmake.in
${CLAPACK_BINARY_DIR}/clapack-config.cmake @ONLY)