aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorjulie <julielangou@users.noreply.github.com>2010-07-07 16:16:15 +0000
committerjulie <julielangou@users.noreply.github.com>2010-07-07 16:16:15 +0000
commitc405a5867363d138b0ceeea57a317bf5b1c7bc2b (patch)
tree92896a202b2699af6ac153b24693bc17841c8fa6 /CMakeLists.txt
parent075253023292256e67adc407ddafcc9e75ef4222 (diff)
Add static/dynamic library, package support and rearrange source files
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt45
1 files changed, 44 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3189f26c..d733b506 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,10 +5,20 @@ if (UNIX)
set( CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fltconsistency -fp_port" )
endif ()
endif ()
+
+# --------------------------------------------------
+# Testing
+
enable_testing()
include(CTest)
enable_testing()
+# --------------------------------------------------
+
set(CMAKE_MODULE_PATH ${LAPACK_SOURCE_DIR} ${CMAKE_MODULE_PATH})
+
+# --------------------------------------------------
+# Check second function
+
include(CheckTimeFunction)
set(TIME_FUNC NONE ${TIME_FUNC})
CHECK_TIME_FUNCTION(NONE TIME_FUNC)
@@ -21,15 +31,48 @@ message(STATUS "--> Will use second_${TIME_FUNC}.f and dsecnd_${TIME_FUNC}.f as
set(SECOND_SRC ${LAPACK_SOURCE_DIR}/INSTALL/second_${TIME_FUNC}.f)
set(DSECOND_SRC ${LAPACK_SOURCE_DIR}/INSTALL/dsecnd_${TIME_FUNC}.f)
+# --------------------------------------------------
+# Subdirectories that need to be processed
+
add_subdirectory(BLAS)
add_subdirectory(SRC)
add_subdirectory(TESTING)
+# --------------------------------------------------
+# CPACK Packaging
+
+SET(CPACK_PACKAGE_NAME "LAPACK")
+SET(CPACK_PACKAGE_VENDOR "University of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd")
+SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LAPACK- Linear Algebra Package")
set(LAPACK_VERSION 3.2.2)
set(CPACK_PACKAGE_VERSION_MAJOR 3)
set(CPACK_PACKAGE_VERSION_MINOR 2)
set(CPACK_PACKAGE_VERSION_PATCH 2)
-include(CPack)
+set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
+SET(CPACK_PACKAGE_INSTALL_DIRECTORY "LAPACK")
+IF(WIN32 AND NOT UNIX)
+ # There is a bug in NSI that does not handle full unix paths properly. Make
+ # sure there is at least one set of four (4) backlasshes.
+ SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\http://icl.cs.utk.edu/lapack-forum")
+ SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.netlib.org/lapack")
+ SET(CPACK_NSIS_CONTACT "lapack@eecs.utk.edu")
+ SET(CPACK_NSIS_MODIFY_PATH ON)
+ SET(CPACK_NSIS_DISPLAY_NAME "LAPACK-${LAPACK_VERSION}")
+ set(CPACK_PACKAGE_RELOCATABLE "true")
+ELSE(WIN32 AND NOT UNIX)
+ SET(CPACK_GENERATOR "TGZ")
+ SET(CPACK_SOURCE_GENERATOR TGZ)
+ SET(CPACK_SOURCE_PACKAGE_FILE_NAME "lapack-${LAPACK_VERSION}" )
+ SET(CPACK_SOURCE_IGNORE_FILES ~$ .svn ${CPACK_SOURCE_IGNORE_FILES} )
+ENDIF(WIN32 AND NOT UNIX)
+INCLUDE(CPack)
+
+
+# --------------------------------------------------
+# By default static library
+OPTION(BUILD_SHARED_LIBS "Build shared libraries" OFF )
+#OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON )
+
export(TARGETS blas lapack FILE lapack-targets.cmake)
configure_file(${LAPACK_SOURCE_DIR}/lapack-config-version.cmake.in
${LAPACK_BINARY_DIR}/lapack-config-version.cmake @ONLY)