123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190 |
- diff -u -r -N clapack-3.2.1-CMAKE.orig/CMakeLists.txt clapack-3.2.1-CMAKE/CMakeLists.txt
- --- clapack-3.2.1-CMAKE.orig/CMakeLists.txt 2009-08-10 20:46:33.000000000 +0200
- +++ clapack-3.2.1-CMAKE/CMakeLists.txt 2010-08-28 14:04:30.000000000 +0200
- @@ -1,7 +1,10 @@
- cmake_minimum_required(VERSION 2.6)
- project(CLAPACK C)
- -enable_testing()
- -include(CTest)
- +
- +if(ENABLE_TESTS)
- + enable_testing()
- + include(CTest)
- +endif(ENABLE_TESTS)
-
- if(WIN32 AND NOT CYGWIN)
- set(SECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/winsecond.c)
- @@ -11,24 +14,34 @@
- set(SECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/second.c)
- set(DSECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/dsecnd.c)
- endif()
- -enable_testing()
- +
- 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)
- -add_subdirectory(TESTING)
- +
- set(CLAPACK_VERSION 3.2.1)
- set(CPACK_PACKAGE_VERSION_MAJOR 3)
- set(CPACK_PACKAGE_VERSION_MINOR 2)
- set(CPACK_PACKAGE_VERSION_PATCH 1)
- +
- +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
- +
- +add_subdirectory(SRC)
- +
- +if(ENABLE_TESTS)
- + add_subdirectory(TESTING)
- +endif(ENABLE_TESTS)
- +
- include(CPack)
- -export(TARGETS f2c blas lapack FILE clapack-targets.cmake)
- +
- +export(TARGETS clapack 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)
- +
- diff -u -r -N clapack-3.2.1-CMAKE.orig/SRC/CMakeLists.txt clapack-3.2.1-CMAKE/SRC/CMakeLists.txt
- --- clapack-3.2.1-CMAKE.orig/SRC/CMakeLists.txt 2009-08-10 19:47:54.000000000 +0200
- +++ clapack-3.2.1-CMAKE/SRC/CMakeLists.txt 2010-08-28 14:32:17.000000000 +0200
- @@ -375,6 +375,20 @@
- if(BUILD_COMPLEX16)
- set(ALLOBJ ${ZLASRC} ${ALLAUX} ${DZLAUX})
- endif()
- -add_library(lapack ${ALLOBJ} ${ALLXOBJ})
- -target_link_libraries(lapack blas)
-
- +add_library(clapack SHARED ${ALLOBJ} ${ALLXOBJ})
- +target_link_libraries(clapack blas f2c m)
- +set_target_properties(clapack PROPERTIES SOVERSION "${CLAPACK_VERSION}")
- +
- +install(
- + TARGETS clapack EXPORT clapack
- + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
- +)
- +
- +install(
- + FILES ../INCLUDE/clapack.h DESTINATION include/clapack
- +)
- +
- +install(
- + EXPORT clapack DESTINATION "share/cmake/Modules" FILE clapack-config.cmake
- +)
- diff -u -r -N clapack-3.2.1-CMAKE.orig/TESTING/EIG/CMakeLists.txt clapack-3.2.1-CMAKE/TESTING/EIG/CMakeLists.txt
- --- clapack-3.2.1-CMAKE.orig/TESTING/EIG/CMakeLists.txt 2009-08-10 19:47:54.000000000 +0200
- +++ clapack-3.2.1-CMAKE/TESTING/EIG/CMakeLists.txt 2010-08-28 13:46:40.000000000 +0200
- @@ -119,7 +119,7 @@
-
- macro(add_eig_executable name )
- add_executable(${name} ${ARGN})
- - target_link_libraries(${name} tmglib lapack )
- + target_link_libraries(${name} tmglib clapack )
- endmacro(add_eig_executable)
-
- add_eig_executable(xeigtsts ${SEIGTST} ${SCIGTST} ${AEIGTST}
- diff -u -r -N clapack-3.2.1-CMAKE.orig/TESTING/LIN/CMakeLists.txt clapack-3.2.1-CMAKE/TESTING/LIN/CMakeLists.txt
- --- clapack-3.2.1-CMAKE.orig/TESTING/LIN/CMakeLists.txt 2009-08-10 20:06:06.000000000 +0200
- +++ clapack-3.2.1-CMAKE/TESTING/LIN/CMakeLists.txt 2010-08-28 13:46:40.000000000 +0200
- @@ -189,7 +189,7 @@
-
- macro(add_lin_executable name )
- add_executable(${name} ${ARGN})
- - target_link_libraries(${name} tmglib lapack)
- + target_link_libraries(${name} tmglib clapack)
- endmacro(add_lin_executable)
-
- add_lin_executable(xlintsts ${ALINTST} ${SCLNTST} ${SLINTST}
- diff -u -r -N clapack-3.2.1-CMAKE.orig/TESTING/MATGEN/CMakeLists.txt clapack-3.2.1-CMAKE/TESTING/MATGEN/CMakeLists.txt
- --- clapack-3.2.1-CMAKE.orig/TESTING/MATGEN/CMakeLists.txt 2009-08-10 19:47:54.000000000 +0200
- +++ clapack-3.2.1-CMAKE/TESTING/MATGEN/CMakeLists.txt 2010-08-28 13:46:40.000000000 +0200
- @@ -65,5 +65,6 @@
- if(BUILD_COMPLEX16)
- set(ALLOBJ $(ZMATGEN) $(DZATGEN))
- endif()
- -add_library(tmglib ${ALLOBJ} )
- +
- +add_library(tmglib ${ALLOBJ} i_len_trim.c i_ceiling.c )
-
- diff -u -r -N clapack-3.2.1-CMAKE.orig/TESTING/MATGEN/i_ceiling.c clapack-3.2.1-CMAKE/TESTING/MATGEN/i_ceiling.c
- --- clapack-3.2.1-CMAKE.orig/TESTING/MATGEN/i_ceiling.c 1970-01-01 01:00:00.000000000 +0100
- +++ clapack-3.2.1-CMAKE/TESTING/MATGEN/i_ceiling.c 2010-08-28 13:46:40.000000000 +0200
- @@ -0,0 +1,38 @@
- +/* file has been copied from the included f2c library - dilfridge */
- +
- +#include <f2c.h>
- +
- +#ifdef KR_headers
- +integer i_sceiling(x) real *x;
- +#else
- +#ifdef __cplusplus
- +extern "C" {
- +#endif
- +integer i_sceiling(real *x)
- +#endif
- +{
- +#define CEIL(x) ((int)(x) + ((x) > 0 && (x) != (int)(x)))
- +
- + return (integer) CEIL(*x);
- +}
- +#ifdef __cplusplus
- +}
- +#endif
- +
- +
- +#ifdef KR_headers
- +integer i_dceiling(x) doublereal *x;
- +#else
- +#ifdef __cplusplus
- +extern "C" {
- +#endif
- +integer i_dceiling(doublereal *x)
- +#endif
- +{
- +#define CEIL(x) ((int)(x) + ((x) > 0 && (x) != (int)(x)))
- +
- + return (integer) CEIL(*x);
- +}
- +#ifdef __cplusplus
- +}
- +#endif
- diff -u -r -N clapack-3.2.1-CMAKE.orig/TESTING/MATGEN/i_len_trim.c clapack-3.2.1-CMAKE/TESTING/MATGEN/i_len_trim.c
- --- clapack-3.2.1-CMAKE.orig/TESTING/MATGEN/i_len_trim.c 1970-01-01 01:00:00.000000000 +0100
- +++ clapack-3.2.1-CMAKE/TESTING/MATGEN/i_len_trim.c 2010-08-28 13:46:40.000000000 +0200
- @@ -0,0 +1,25 @@
- +/* file has been copied from the included f2c library - dilfridge */
- +
- +#include <f2c.h>
- +
- +#ifdef __cplusplus
- +extern "C" {
- +#endif
- +
- +#ifdef KR_headers
- +integer i_len_trim(s, n) char *s; ftnlen n;
- +#else
- +integer i_len_trim(char *s, ftnlen n)
- +#endif
- +{
- + int i;
- +
- + for(i=n-1;i>=0;i--)
- + if(s[i] != ' ')
- + return i + 1;
- +
- + return(0);
- +}
- +#ifdef __cplusplus
- +}
- +#endif
|