diff --git a/BLAS/CMakeLists.txt b/BLAS/CMakeLists.txt index 45e68e9960..9958f8be8e 100644 --- a/BLAS/CMakeLists.txt +++ b/BLAS/CMakeLists.txt @@ -1,7 +1,7 @@ add_subdirectory(SRC) if(BUILD_TESTING) add_subdirectory(TESTING) -endif(BUILD_TESTING) +endif() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/blas.pc.in ${CMAKE_CURRENT_BINARY_DIR}/blas.pc) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/blas.pc diff --git a/BLAS/TESTING/CMakeLists.txt b/BLAS/TESTING/CMakeLists.txt index 2b7a6a60ae..e0d9a05beb 100644 --- a/BLAS/TESTING/CMakeLists.txt +++ b/BLAS/TESTING/CMakeLists.txt @@ -43,7 +43,7 @@ macro(add_blas_test name src) -DINTDIR=${CMAKE_CFG_INTDIR} -P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake") endif() -endmacro(add_blas_test) +endmacro() if(BUILD_SINGLE) add_blas_test(xblat1s sblat1.f) diff --git a/CBLAS/CMakeLists.txt b/CBLAS/CMakeLists.txt index b014270a4d..a4a9b8d52d 100644 --- a/CBLAS/CMakeLists.txt +++ b/CBLAS/CMakeLists.txt @@ -28,17 +28,17 @@ endforeach() endmacro() append_subdir_files(CBLAS_INCLUDE "include") -INSTALL( FILES ${CBLAS_INCLUDE} ${LAPACK_BINARY_DIR}/include/cblas_mangling.h DESTINATION include ) +install( FILES ${CBLAS_INCLUDE} ${LAPACK_BINARY_DIR}/include/cblas_mangling.h DESTINATION include ) # -------------------------------------------------- if(BUILD_TESTING) add_subdirectory(testing) add_subdirectory(examples) -endif(BUILD_TESTING) +endif() if(NOT BLAS_FOUND) set(ALL_TARGETS ${ALL_TARGETS} blas) -endif(NOT BLAS_FOUND) +endif() # Export cblas targets from the # install tree, if any. diff --git a/CBLAS/include/CMakeLists.txt b/CBLAS/include/CMakeLists.txt index 208733b272..a333467ad8 100644 --- a/CBLAS/include/CMakeLists.txt +++ b/CBLAS/include/CMakeLists.txt @@ -1,3 +1,3 @@ -SET (CBLAS_INCLUDE cblas.h cblas_f77.h cblas_test.h ) +set (CBLAS_INCLUDE cblas.h cblas_f77.h cblas_test.h ) file(COPY ${CBLAS_INCLUDE} DESTINATION ${LAPACK_BINARY_DIR}/include) diff --git a/CBLAS/src/CMakeLists.txt b/CBLAS/src/CMakeLists.txt index 41b74a2313..90496b92dc 100644 --- a/CBLAS/src/CMakeLists.txt +++ b/CBLAS/src/CMakeLists.txt @@ -146,22 +146,22 @@ set(ALLOBJ ${SCLEV1} ${SLEV1} ${SLEV2} ${SLEV3} ${ERRHAND} # Single real precision if(CBLAS_SINGLE) set(ALLOBJ ${SCLEV1} ${SLEV1} ${SLEV2} ${SLEV3} ${ERRHAND}) -endif(CBLAS_SINGLE) +endif() # Double real precision if(CBLAS_DOUBLE) set(ALLOBJ ${DLEV1} ${DLEV2} ${DLEV3} ${ERRHAND}) -endif(CBLAS_DOUBLE) +endif() # Single complex precision if (CBLAS_COMPLEX) set(ALLOBJ ${CLEV1} ${SCLEV1} ${CLEV2} ${CLEV3} ${ERRHAND}) -endif(CBLAS_COMPLEX) +endif() # Double complex precision if (CBLAS_COMPLEX16) set(ALLOBJ ${ZLEV1} ${ZLEV2} ${ZLEV3} ${ERRHAND}) -endif(CBLAS_COMPLEX16) +endif() add_library(cblas ${ALLOBJ}) target_link_libraries(cblas ${BLAS_LIBRARIES} ) diff --git a/CBLAS/testing/CMakeLists.txt b/CBLAS/testing/CMakeLists.txt index beaa2cd0c7..5648029953 100644 --- a/CBLAS/testing/CMakeLists.txt +++ b/CBLAS/testing/CMakeLists.txt @@ -22,30 +22,30 @@ macro(add_cblas_test output input target) -DINTDIR=${CMAKE_CFG_INTDIR} -P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake") endif() -endmacro(add_cblas_test) +endmacro() # Object files for single real precision -SET( STESTL1O c_sblas1.c) +set( STESTL1O c_sblas1.c) -SET( STESTL2O c_sblas2.c c_s2chke.c auxiliary.c c_xerbla.c) -SET( STESTL2O c_sblas2.c c_s2chke.c auxiliary.c c_xerbla.c) -SET( STESTL3O c_sblas3.c c_s3chke.c auxiliary.c c_xerbla.c) +set( STESTL2O c_sblas2.c c_s2chke.c auxiliary.c c_xerbla.c) +set( STESTL2O c_sblas2.c c_s2chke.c auxiliary.c c_xerbla.c) +set( STESTL3O c_sblas3.c c_s3chke.c auxiliary.c c_xerbla.c) # Object files for double real precision -SET( DTESTL1O c_dblas1.c) -SET( DTESTL2O c_dblas2.c c_d2chke.c auxiliary.c c_xerbla.c) -SET( DTESTL3O c_dblas3.c c_d3chke.c auxiliary.c c_xerbla.c) +set( DTESTL1O c_dblas1.c) +set( DTESTL2O c_dblas2.c c_d2chke.c auxiliary.c c_xerbla.c) +set( DTESTL3O c_dblas3.c c_d3chke.c auxiliary.c c_xerbla.c) # Object files for single complex precision -SET( CTESTL1O c_cblat1.f c_cblas1.c) -SET( CTESTL2O c_cblas2.c c_c2chke.c auxiliary.c c_xerbla.c) -SET( CTESTL3O c_cblas3.c c_c3chke.c auxiliary.c c_xerbla.c) +set( CTESTL1O c_cblat1.f c_cblas1.c) +set( CTESTL2O c_cblas2.c c_c2chke.c auxiliary.c c_xerbla.c) +set( CTESTL3O c_cblas3.c c_c3chke.c auxiliary.c c_xerbla.c) # Object files for double complex precision -SET( ZTESTL1O c_zblas1.c) -SET( ZTESTL2O c_zblas2.c c_z2chke.c auxiliary.c c_xerbla.c) -SET( ZTESTL3O c_zblas3.c c_z3chke.c auxiliary.c c_xerbla.c) +set( ZTESTL1O c_zblas1.c) +set( ZTESTL2O c_zblas2.c c_z2chke.c auxiliary.c c_xerbla.c) +set( ZTESTL3O c_zblas3.c c_z3chke.c auxiliary.c c_xerbla.c) diff --git a/CMAKE/CheckTimeFunction.cmake b/CMAKE/CheckTimeFunction.cmake index 350a591324..b57394887c 100644 --- a/CMAKE/CheckTimeFunction.cmake +++ b/CMAKE/CheckTimeFunction.cmake @@ -18,11 +18,11 @@ macro(CHECK_TIME_FUNCTION FUNCTION VARIABLE) message(STATUS "Looking for Fortran ${FUNCTION} - found") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "Fortran ${FUNCTION} exists. ${OUTPUT} \n\n") - else(RES) + else() message(STATUS "Looking for Fortran ${FUNCTION} - not found") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "Fortran ${FUNCTION} does not exist. \n ${OUTPUT} \n") - endif(RES) -endmacro(CHECK_TIME_FUNCTION) + endif() +endmacro() diff --git a/CMAKE/FortranMangling.cmake b/CMAKE/FortranMangling.cmake index 2d9c6266c0..d772dc9bba 100644 --- a/CMAKE/FortranMangling.cmake +++ b/CMAKE/FortranMangling.cmake @@ -10,37 +10,37 @@ # UpCase # macro(FORTRAN_MANGLING CDEFS) -MESSAGE(STATUS "=========") - GET_FILENAME_COMPONENT(F77_NAME ${CMAKE_Fortran_COMPILER} NAME) - GET_FILENAME_COMPONENT(F77_PATH ${CMAKE_Fortran_COMPILER} PATH) - SET(F77 ${F77_NAME} CACHE INTERNAL "Name of the fortran compiler.") +message(STATUS "=========") + get_filename_component(F77_NAME ${CMAKE_Fortran_COMPILER} NAME) + get_filename_component(F77_PATH ${CMAKE_Fortran_COMPILER} PATH) + set(F77 ${F77_NAME} CACHE INTERNAL "Name of the fortran compiler.") - IF(${F77} STREQUAL "ifort.exe") + if(${F77} STREQUAL "ifort.exe") #settings for Intel Fortran - SET(F77_OPTION_COMPILE "/c" CACHE INTERNAL + set(F77_OPTION_COMPILE "/c" CACHE INTERNAL "Fortran compiler option for compiling without linking.") - SET(F77_OUTPUT_OBJ "/Fo" CACHE INTERNAL + set(F77_OUTPUT_OBJ "/Fo" CACHE INTERNAL "Fortran compiler option for setting object file name.") - SET(F77_OUTPUT_EXE "/Fe" CACHE INTERNAL + set(F77_OUTPUT_EXE "/Fe" CACHE INTERNAL "Fortran compiler option for setting executable file name.") - ELSE(${F77} STREQUAL "ifort.exe") + else() # in other case, let user specify their fortran configrations. - SET(F77_OPTION_COMPILE "-c" CACHE STRING + set(F77_OPTION_COMPILE "-c" CACHE STRING "Fortran compiler option for compiling without linking.") - SET(F77_OUTPUT_OBJ "-o" CACHE STRING + set(F77_OUTPUT_OBJ "-o" CACHE STRING "Fortran compiler option for setting object file name.") - SET(F77_OUTPUT_EXE "-o" CACHE STRING + set(F77_OUTPUT_EXE "-o" CACHE STRING "Fortran compiler option for setting executable file name.") - SET(F77_LIB_PATH "" CACHE PATH + set(F77_LIB_PATH "" CACHE PATH "Library path for the fortran compiler") - SET(F77_INCLUDE_PATH "" CACHE PATH + set(F77_INCLUDE_PATH "" CACHE PATH "Include path for the fortran compiler") - ENDIF(${F77} STREQUAL "ifort.exe") + endif() -MESSAGE(STATUS "Testing FORTRAN_MANGLING") +message(STATUS "Testing FORTRAN_MANGLING") -MESSAGE(STATUS "Compiling Finface.f...") +message(STATUS "Compiling Finface.f...") execute_process ( COMMAND ${CMAKE_Fortran_COMPILER} ${F77_OPTION_COMPILE} ${PROJECT_SOURCE_DIR}/lapacke/mangling/Fintface.f WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp @@ -49,13 +49,13 @@ MESSAGE(STATUS "Compiling Finface.f...") ERROR_VARIABLE ERROR) if(RESULT EQUAL 0) - MESSAGE(STATUS "Compiling Finface.f successful") + message(STATUS "Compiling Finface.f successful") else() - MESSAGE(FATAL_ERROR " Compiling Finface.f FAILED") - MESSAGE(FATAL_ERROR " Error:\n ${ERROR}") + message(FATAL_ERROR " Compiling Finface.f FAILED") + message(FATAL_ERROR " Error:\n ${ERROR}") endif() -MESSAGE(STATUS "Compiling Cintface.c...") +message(STATUS "Compiling Cintface.c...") execute_process ( COMMAND ${CMAKE_C_COMPILER} ${F77_OPTION_COMPILE} ${PROJECT_SOURCE_DIR}/lapacke/mangling/Cintface.c WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp @@ -64,13 +64,13 @@ MESSAGE(STATUS "Compiling Cintface.c...") ERROR_VARIABLE ERROR) if(RESULT EQUAL 0) - MESSAGE(STATUS "Compiling Cintface.c successful") + message(STATUS "Compiling Cintface.c successful") else() - MESSAGE(FATAL_ERROR " Compiling Cintface.c FAILED") - MESSAGE(FATAL_ERROR " Error:\n ${ERROR}") + message(FATAL_ERROR " Compiling Cintface.c FAILED") + message(FATAL_ERROR " Error:\n ${ERROR}") endif() -MESSAGE(STATUS "Linking Finface.f and Cintface.c...") +message(STATUS "Linking Finface.f and Cintface.c...") execute_process ( COMMAND ${CMAKE_Fortran_COMPILER} ${F77_OUTPUT_OBJ} xintface.exe Fintface.o Cintface.o WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp @@ -79,13 +79,13 @@ MESSAGE(STATUS "Linking Finface.f and Cintface.c...") ERROR_VARIABLE ERROR) if(RESULT EQUAL 0) - MESSAGE(STATUS "Linking Finface.f and Cintface.c successful") + message(STATUS "Linking Finface.f and Cintface.c successful") else() - MESSAGE(FATAL_ERROR " Linking Finface.f and Cintface.c FAILED") - MESSAGE(FATAL_ERROR " Error:\n ${ERROR}") + message(FATAL_ERROR " Linking Finface.f and Cintface.c FAILED") + message(FATAL_ERROR " Error:\n ${ERROR}") endif() -MESSAGE(STATUS "Running ./xintface...") +message(STATUS "Running ./xintface...") execute_process ( COMMAND ./xintface.exe WORKING_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp @@ -95,11 +95,11 @@ MESSAGE(STATUS "Running ./xintface...") if (xintface_RES EQUAL 0) - STRING(REPLACE "\n" "" xintface_OUT "${xintface_OUT}") - MESSAGE(STATUS "Fortran MANGLING convention: ${xintface_OUT}") - SET(CDEFS ${xintface_OUT}) + string(REPLACE "\n" "" xintface_OUT "${xintface_OUT}") + message(STATUS "Fortran MANGLING convention: ${xintface_OUT}") + set(CDEFS ${xintface_OUT}) else() - MESSAGE(FATAL_ERROR "FORTRAN_MANGLING:ERROR ${xintface_ERR}") + message(FATAL_ERROR "FORTRAN_MANGLING:ERROR ${xintface_ERR}") endif() -endmacro(FORTRAN_MANGLING) +endmacro() diff --git a/CMakeLists.txt b/CMakeLists.txt index 5055c9c4f3..21cc5477db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,7 +43,7 @@ if (UNIX) endif () # Delete libmtsk in linking sequence for Sun/Oracle Fortran Compiler. # This library is not present in the Sun package SolarisStudio12.3-linux-x86-bin - STRING(REPLACE \;mtsk\; \; CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}") + string(REPLACE \;mtsk\; \; CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}") endif () if ( CMAKE_Fortran_COMPILER_ID STREQUAL "Compaq" ) @@ -157,17 +157,17 @@ if(BLAS_LIBRARIES) unset( CMAKE_REQUIRED_LIBRARIES ) if(BLAS_FOUND) message(STATUS "--> BLAS supplied by user is WORKING, will use ${BLAS_LIBRARIES}.") - else(BLAS_FOUND) + else() message(ERROR "--> BLAS supplied by user is not WORKING, CANNOT USE ${BLAS_LIBRARIES}.") message(ERROR "--> Will use REFERENCE BLAS (by default)") message(ERROR "--> Or Correct your BLAS_LIBRARIES entry ") message(ERROR "--> Or Consider checking USE_OPTIMIZED_BLAS") - endif(BLAS_FOUND) + endif() # User did not provide a BLAS Library but specified to search for one elseif( USE_OPTIMIZED_BLAS ) find_package( BLAS ) -endif (BLAS_LIBRARIES) +endif () # Neither user specified or optimized BLAS libraries can be used if(NOT BLAS_FOUND) @@ -184,7 +184,7 @@ else() set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${BLAS_LINKER_FLAGS}" CACHE STRING "Linker flags for shared libs" FORCE) -endif( NOT BLAS_FOUND ) +endif() # -------------------------------------------------- @@ -193,7 +193,7 @@ option(CBLAS "Build CBLAS" OFF) if(CBLAS) add_subdirectory(CBLAS) -endif(CBLAS) +endif() # -------------------------------------------------- # XBLAS @@ -201,7 +201,7 @@ endif(CBLAS) option(USE_XBLAS "Build extended precision (needs XBLAS)" OFF) if (USE_XBLAS) find_library(XBLAS_LIBRARY NAMES xblas) -endif(USE_XBLAS) +endif() option(USE_OPTIMIZED_LAPACK "Whether or not to use an optimized LAPACK library instead of included netlib LAPACK" OFF) @@ -210,7 +210,7 @@ option(USE_OPTIMIZED_LAPACK "Whether or not to use an optimized LAPACK library i # User did not provide a LAPACK Library but specified to search for one if( USE_OPTIMIZED_LAPACK ) find_package( LAPACK ) -endif (USE_OPTIMIZED_LAPACK) +endif () # Check the usage of the user provided or automatically found LAPACK libraries if(LAPACK_LIBRARIES) @@ -221,13 +221,13 @@ if(LAPACK_LIBRARIES) unset( CMAKE_REQUIRED_LIBRARIES ) if(LATESTLAPACK_FOUND) message(STATUS "--> LAPACK supplied by user is WORKING, will use ${LAPACK_LIBRARIES}.") - else(LAPACK_FOUND) + else() message(ERROR "--> LAPACK supplied by user is not WORKING or is older than LAPACK 3.4.0, CANNOT USE ${LAPACK_LIBRARIES}.") message(ERROR "--> Will use REFERENCE LAPACK (by default)") message(ERROR "--> Or Correct your LAPACK_LIBRARIES entry ") message(ERROR "--> Or Consider checking USE_OPTIMIZED_LAPACK") - endif(LATESTLAPACK_FOUND) -endif (LAPACK_LIBRARIES) + endif() +endif () # Neither user specified or optimized LAPACK libraries can be used if(NOT LATESTLAPACK_FOUND) @@ -248,12 +248,12 @@ else() set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${LAPACK_LINKER_FLAGS}" CACHE STRING "Linker flags for shared libs" FORCE) -endif( NOT LATESTLAPACK_FOUND ) +endif() message(STATUS "BUILD TESTING : ${BUILD_TESTING}" ) if(BUILD_TESTING) add_subdirectory(TESTING) -endif(BUILD_TESTING) +endif() # deprecated LAPACK routines option(BUILD_DEPRECATED "Build deprecated routines" OFF) @@ -269,59 +269,59 @@ if (LAPACKE_WITH_TMG) set(LAPACKE ON) if(NOT BUILD_TESTING) add_subdirectory(TESTING/MATGEN) - endif(NOT BUILD_TESTING) -endif(LAPACKE_WITH_TMG) + endif() +endif() if(LAPACKE) add_subdirectory(LAPACKE) -endif(LAPACKE) +endif() # -------------------------------------------------- # 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(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(CPACK_PACKAGE_VERSION_MAJOR 3) set(CPACK_PACKAGE_VERSION_MINOR 5) set(CPACK_PACKAGE_VERSION_PATCH 0) set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") -SET(CPACK_PACKAGE_INSTALL_DIRECTORY "LAPACK") -IF(WIN32 AND NOT UNIX) +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_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) +else() + 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() +include(CPack) # -------------------------------------------------- # By default static library -OPTION(BUILD_SHARED_LIBS "Build shared libraries" OFF ) -OPTION(BUILD_STATIC_LIBS "Build static libraries" ON ) -#OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON ) +option(BUILD_SHARED_LIBS "Build shared libraries" OFF ) +option(BUILD_STATIC_LIBS "Build static libraries" ON ) +#option(BUILD_SHARED_LIBS "Build shared libraries" ON ) if(NOT BLAS_FOUND) set(ALL_TARGETS ${ALL_TARGETS} blas) -endif(NOT BLAS_FOUND) +endif() if(NOT LATESTLAPACK_FOUND) set(ALL_TARGETS ${ALL_TARGETS} lapack) -endif(NOT LATESTLAPACK_FOUND) +endif() if(BUILD_TESTING OR LAPACKE_WITH_TMG) set(ALL_TARGETS ${ALL_TARGETS} tmglib) -endif(BUILD_TESTING OR LAPACKE_WITH_TMG) +endif() # Export lapack targets, not including lapacke, from the # install tree, if any. @@ -338,12 +338,12 @@ endif() # Include cblas in targets exported from the build tree. if(CBLAS) set(ALL_TARGETS ${ALL_TARGETS} cblas) -endif(CBLAS) +endif() # Include lapacke in targets exported from the build tree. if(LAPACKE) set(ALL_TARGETS ${ALL_TARGETS} lapacke) -endif(LAPACKE) +endif() # Export lapack and lapacke targets from the build tree, if any. set(_lapack_config_build_guard_target "") diff --git a/CTestConfig.cmake b/CTestConfig.cmake index a12749640b..17770d86b0 100644 --- a/CTestConfig.cmake +++ b/CTestConfig.cmake @@ -2,8 +2,8 @@ ## Then modify the CMakeLists.txt file in the root directory of your ## project to incorporate the testing dashboard. ## # The following are required to uses Dart and the Cdash dashboard -## ENABLE_TESTING() -## INCLUDE(CTest) +## enable_testing() +## include(CTest) set(CTEST_PROJECT_NAME "LAPACK") set(CTEST_NIGHTLY_START_TIME "00:00:00 EST") diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in index c10cd32fc9..19469afe10 100644 --- a/CTestCustom.cmake.in +++ b/CTestCustom.cmake.in @@ -3,13 +3,13 @@ # see http://www.vtk.org/Wiki/CMake_Testing_With_CTest#Customizing_CTest # -SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 0) -SET(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 0) -SET(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 500) -SET(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 500) +set(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 0) +set(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 0) +set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 500) +set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 500) # Files to explicitly exclude from code coverage -SET(CTEST_CUSTOM_COVERAGE_EXCLUDE +set(CTEST_CUSTOM_COVERAGE_EXCLUDE ${CTEST_CUSTOM_COVERAGE_EXCLUDE} # Exclude the internal BLAS libraries @@ -20,7 +20,7 @@ SET(CTEST_CUSTOM_COVERAGE_EXCLUDE ) # Warnings to explicitly ignore -SET(CTEST_CUSTOM_WARNING_EXCEPTION +set(CTEST_CUSTOM_WARNING_EXCEPTION ${CTEST_CUSTOM_WARNING_EXCEPTION} # Common warning when linking ATLAS built with GNU Fortran 4.1 and building @@ -43,4 +43,4 @@ SET(CTEST_CUSTOM_WARNING_EXCEPTION "Character string truncated to length 1 on assignment" ) -SET(CTEST_CUSTOM_POST_TEST "./lapack_testing.py -s -d TESTING") \ No newline at end of file +set(CTEST_CUSTOM_POST_TEST "./lapack_testing.py -s -d TESTING") \ No newline at end of file diff --git a/LAPACKE/CMakeLists.txt b/LAPACKE/CMakeLists.txt index 7208d53e55..164ae15fa4 100644 --- a/LAPACKE/CMakeLists.txt +++ b/LAPACKE/CMakeLists.txt @@ -17,9 +17,9 @@ if( NOT FortranCInterface_GLOBAL_FOUND OR NOT FortranCInterface_MODULE_FOUND) endif () if (WIN32 AND NOT UNIX) - ADD_DEFINITIONS(-DHAVE_LAPACK_CONFIG_H -DLAPACK_COMPLEX_STRUCTURE) - MESSAGE (STATUS "Windows BUILD") -endif (WIN32 AND NOT UNIX) + add_definitions(-DHAVE_LAPACK_CONFIG_H -DLAPACK_COMPLEX_STRUCTURE) + message (STATUS "Windows BUILD") +endif () get_directory_property( DirDefs COMPILE_DEFINITIONS ) @@ -44,22 +44,22 @@ append_subdir_files(UTILS_OBJ "utils") if (USE_XBLAS) add_library(lapacke ${SRC_OBJ} ${SRCX_OBJ} ${UTILS_OBJ}) target_link_libraries(lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${XBLAS_LIBRARY}) -else (USE_XBLAS) +else () if (LAPACKE_WITH_TMG) add_library(lapacke ${SRC_OBJ} ${MATGEN_OBJ} ${UTILS_OBJ}) target_link_libraries(lapacke tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) - else (LAPACKE_WITH_TMG) + else () add_library(lapacke ${SRC_OBJ} ${UTILS_OBJ}) target_link_libraries(lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) - endif(LAPACKE_WITH_TMG) -endif(USE_XBLAS) + endif() +endif() lapack_install_library(lapacke) -INSTALL( FILES ${LAPACKE_INCLUDE} ${LAPACK_BINARY_DIR}/include/lapacke_mangling.h DESTINATION include ) +install( FILES ${LAPACKE_INCLUDE} ${LAPACK_BINARY_DIR}/include/lapacke_mangling.h DESTINATION include ) if(BUILD_TESTING) add_subdirectory(example) -endif(BUILD_TESTING) +endif() configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapacke.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc) diff --git a/LAPACKE/include/CMakeLists.txt b/LAPACKE/include/CMakeLists.txt index fbcfbdd963..3034962b32 100644 --- a/LAPACKE/include/CMakeLists.txt +++ b/LAPACKE/include/CMakeLists.txt @@ -1,3 +1,3 @@ -SET (LAPACKE_INCLUDE lapacke.h lapacke_config.h lapacke_utils.h ) +set (LAPACKE_INCLUDE lapacke.h lapacke_config.h lapacke_utils.h ) file(COPY ${LAPACKE_INCLUDE} DESTINATION ${LAPACK_BINARY_DIR}/include) diff --git a/LAPACKE/src/CMakeLists.txt b/LAPACKE/src/CMakeLists.txt index d59ab8a677..f1a870158d 100644 --- a/LAPACKE/src/CMakeLists.txt +++ b/LAPACKE/src/CMakeLists.txt @@ -1,6 +1,6 @@ -#AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} SRC_OBJ) +#aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} SRC_OBJ) -SET (SRC_OBJ +set (SRC_OBJ lapacke_cbbcsd.c lapacke_cbbcsd_work.c lapacke_cbdsqr.c @@ -2085,7 +2085,7 @@ lapacke_ilaver.c ) if(BUILD_DEPRECATED) - LIST(APPEND SRC_OBJ + list(APPEND SRC_OBJ lapacke_cggsvp.c lapacke_cggsvp_work.c lapacke_dggsvp.c @@ -2113,7 +2113,7 @@ if(BUILD_DEPRECATED) message(STATUS "Building LAPACKE deprecated routines") endif() -SET(SRCX_OBJ +set(SRCX_OBJ lapacke_cgbrfsx.c lapacke_cporfsx.c lapacke_dgerfsx.c lapacke_sgbrfsx.c lapacke_ssyrfsx.c lapacke_zherfsx.c lapacke_cgbrfsx_work.c lapacke_cporfsx_work.c lapacke_dgerfsx_work.c lapacke_sgbrfsx_work.c lapacke_ssyrfsx_work.c lapacke_zherfsx_work.c lapacke_cgerfsx.c lapacke_csyrfsx.c lapacke_dporfsx.c lapacke_sgerfsx.c lapacke_zgbrfsx.c lapacke_zporfsx.c @@ -2129,7 +2129,7 @@ lapacke_chesvxx_work.c lapacke_dgbsvxx_work.c lapacke_dsysvxx_work.c lapacke_ ) # FILE PARTS OF TMGLIB -SET (MATGEN_OBJ +set (MATGEN_OBJ lapacke_clatms.c lapacke_clatms_work.c lapacke_dlatms.c diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt index bb5fc44d6c..b80deaba24 100644 --- a/SRC/CMakeLists.txt +++ b/SRC/CMakeLists.txt @@ -415,16 +415,16 @@ if( USE_XBLAS) endif() if(BUILD_DEPRECATED) - LIST(APPEND SLASRC DEPRECATED/sgegs.f DEPRECATED/sgegv.f + list(APPEND SLASRC DEPRECATED/sgegs.f DEPRECATED/sgegv.f DEPRECATED/sgeqpf.f DEPRECATED/sgelsx.f DEPRECATED/sggsvd.f DEPRECATED/sggsvp.f DEPRECATED/slahrd.f DEPRECATED/slatzm.f DEPRECATED/stzrqf.f) - LIST(APPEND DLASRC DEPRECATED/dgegs.f DEPRECATED/dgegv.f + list(APPEND DLASRC DEPRECATED/dgegs.f DEPRECATED/dgegv.f DEPRECATED/dgeqpf.f DEPRECATED/dgelsx.f DEPRECATED/dggsvd.f DEPRECATED/dggsvp.f DEPRECATED/dlahrd.f DEPRECATED/dlatzm.f DEPRECATED/dtzrqf.f ) - LIST(APPEND CLASRC DEPRECATED/cgegs.f DEPRECATED/cgegv.f + list(APPEND CLASRC DEPRECATED/cgegs.f DEPRECATED/cgegv.f DEPRECATED/cgeqpf.f DEPRECATED/cgelsx.f DEPRECATED/cggsvd.f DEPRECATED/cggsvp.f DEPRECATED/clahrd.f DEPRECATED/clatzm.f DEPRECATED/ctzrqf.f) - LIST(APPEND ZLASRC DEPRECATED/zgegs.f DEPRECATED/zgegv.f + list(APPEND ZLASRC DEPRECATED/zgegs.f DEPRECATED/zgegv.f DEPRECATED/zgeqpf.f DEPRECATED/zgelsx.f DEPRECATED/zggsvd.f DEPRECATED/zggsvp.f DEPRECATED/zlahrd.f DEPRECATED/zlatzm.f DEPRECATED/ztzrqf.f) message(STATUS "Building deprecated routines") diff --git a/TESTING/CMakeLists.txt b/TESTING/CMakeLists.txt index b7e5db97a2..2d587376a5 100644 --- a/TESTING/CMakeLists.txt +++ b/TESTING/CMakeLists.txt @@ -20,7 +20,7 @@ macro(add_lapack_test output input target) -DINTDIR=${CMAKE_CFG_INTDIR} -P "${LAPACK_SOURCE_DIR}/TESTING/runtest.cmake") endif() -endmacro(add_lapack_test) +endmacro() if (BUILD_SINGLE) add_lapack_test(stest.out stest.in xlintsts) diff --git a/TESTING/EIG/CMakeLists.txt b/TESTING/EIG/CMakeLists.txt index 612bf1f394..b6bc77d6bb 100644 --- a/TESTING/EIG/CMakeLists.txt +++ b/TESTING/EIG/CMakeLists.txt @@ -120,7 +120,7 @@ set(ZEIGTST zchkee.f macro(add_eig_executable name ) add_executable(${name} ${ARGN}) target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES}) -endmacro(add_eig_executable) +endmacro() if (BUILD_SINGLE) add_eig_executable(xeigtsts ${SEIGTST} ${SCIGTST} ${AEIGTST} diff --git a/TESTING/LIN/CMakeLists.txt b/TESTING/LIN/CMakeLists.txt index 50d16cab31..a924b12f17 100644 --- a/TESTING/LIN/CMakeLists.txt +++ b/TESTING/LIN/CMakeLists.txt @@ -194,9 +194,9 @@ set(ZLINTSTRFP zchkrfp.f zdrvrfp.f zdrvrf1.f zdrvrf2.f zdrvrf3.f zdrvrf4.f zerr macro(add_lin_executable name ) add_executable(${name} ${ARGN}) target_link_libraries(${name} tmglib ${LAPACK_LIBRARIES}) -endmacro(add_lin_executable) +endmacro() -IF(BUILD_SINGLE) +if(BUILD_SINGLE) add_lin_executable(xlintsts ${ALINTST} ${SCLNTST} ${SLINTST} ${SECOND_SRC} ) add_lin_executable(xlintstrfs ${SLINTSTRFP} ${SECOND_SRC}) endif() @@ -206,7 +206,7 @@ add_lin_executable(xlintstd ${ALINTST} ${DLINTST} ${DZLNTST} ${DSECOND_SRC}) add_lin_executable(xlintstrfd ${DLINTSTRFP} ${DSECOND_SRC}) endif() -IF(BUILD_SINGLE AND BUILD_DOUBLE) +if(BUILD_SINGLE AND BUILD_DOUBLE) add_lin_executable(xlintstds ${DSLINTST} ${SECOND_SRC} ${DSECOND_SRC} ) endif() @@ -220,6 +220,6 @@ add_lin_executable(xlintstz ${ALINTST} ${ZLINTST} ${DZLNTST} ${DSECOND_SRC}) add_lin_executable(xlintstrfz ${ZLINTSTRFP} ${DSECOND_SRC}) endif() -IF(BUILD_COMPLEX AND BUILD_COMPLEX16) +if(BUILD_COMPLEX AND BUILD_COMPLEX16) add_lin_executable(xlintstzc ${ZCLINTST} ${SECOND_SRC} ${DSECOND_SRC} ) endif() diff --git a/lapack_build.cmake b/lapack_build.cmake index 404ebd747f..a9012b3b54 100644 --- a/lapack_build.cmake +++ b/lapack_build.cmake @@ -5,14 +5,14 @@ cmake_minimum_required(VERSION 2.8.7) if(UNIX) if(NOT compiler) set(compiler gcc) - endif(NOT compiler) + endif() if(NOT c_compiler) set(c_compiler gcc) - endif(NOT c_compiler) + endif() if(NOT full_compiler) set(full_compiler g++) - endif(NOT full_compiler) -endif(UNIX) + endif() +endif() if(EXISTS "/proc/cpuinfo") set(parallel 1) @@ -21,7 +21,7 @@ if(EXISTS "/proc/cpuinfo") if("${line}" MATCHES processor) math(EXPR parallel "${parallel} + 1") endif() - endforeach(line) + endforeach() endif() if(WIN32) @@ -57,7 +57,7 @@ if(WIN32) set(CTEST_CMAKE_GENERATOR "${GENERATOR}") message("${CTEST_CMAKE_GENERATOR} - found") set(compiler cl) -endif(WIN32) +endif() find_program(HOSTNAME NAMES hostname) find_program(UNAME NAMES uname) @@ -70,7 +70,7 @@ message("HOSTNAME: ${hostname}") # default to parallel 1 if(NOT DEFINED parallel) set(parallel 1) -endif(NOT DEFINED parallel) +endif() # find CVS find_program(SVN svn PATHS $ENV{HOME}/bin /vol/local/bin) @@ -83,7 +83,7 @@ macro(getuname name flag) exec_program("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}") string(REGEX REPLACE "[/\\\\+<> #]" "-" "${name}" "${${name}}") string(REGEX REPLACE "^(......|.....|....|...|..|.).*" "\\1" "${name}" "${${name}}") -endmacro(getuname) +endmacro() getuname(osname -s) getuname(osver -v) @@ -97,12 +97,12 @@ if("${osname}" MATCHES Darwin) set(osrel "") if("${cpu}" MATCHES "Power") set(cpu "ppc") - endif("${cpu}" MATCHES "Power") -endif("${osname}" MATCHES Darwin) + endif() +endif() if(NOT compiler) message(FATAL_ERROR "compiler must be set") -endif(NOT compiler) +endif() set(BUILDNAME "${osname}${osver}${osrel}${cpu}-${compiler}") @@ -116,9 +116,9 @@ set (CTEST_DIR_NAME "${CTEST_MODULE_NAME}SVN") message("NOSPACES = ${NOSPACES}") if(NOSPACES) set(CTEST_DASHBOARD_ROOT "$ENV{HOME}/Dashboards/MyTests-${BUILDNAME}") -else(NOSPACES) +else() set(CTEST_DASHBOARD_ROOT "$ENV{HOME}/Dashboards/My Tests-${BUILDNAME}") -endif(NOSPACES) +endif() set(CTEST_SITE "${hostname}") set(CTEST_BUILD_NAME "${BUILDNAME}") set(CTEST_TEST_TIMEOUT "36000") @@ -127,12 +127,12 @@ set(CTEST_TEST_TIMEOUT "36000") if(NOT EXISTS "${CTEST_DASHBOARD_ROOT}/${CTEST_DIR_NAME}") set(CTEST_CHECKOUT_COMMAND "\"${CTEST_UPDATE_COMMAND}\" co https://icl.cs.utk.edu/svn/lapack-dev/lapack/trunk ${CTEST_DIR_NAME}") -endif(NOT EXISTS "${CTEST_DASHBOARD_ROOT}/${CTEST_DIR_NAME}") +endif() # Set the generator and build configuration if(NOT DEFINED CTEST_CMAKE_GENERATOR) set(CTEST_CMAKE_GENERATOR "Unix Makefiles") -endif(NOT DEFINED CTEST_CMAKE_GENERATOR) +endif() set(CTEST_PROJECT_NAME "LAPACK") set(CTEST_BUILD_CONFIGURATION "Release") @@ -142,7 +142,7 @@ if(CTEST_CMAKE_GENERATOR MATCHES Makefiles) set(ENV{CC} "${c_compiler}") set(ENV{FC} "${f_compiler}") set(ENV{CXX} "${full_compiler}") -endif(CTEST_CMAKE_GENERATOR MATCHES Makefiles) +endif() #---------------------------------------------------------------------------------- # Should not need to edit under this line @@ -164,12 +164,12 @@ set(CTEST_NOTES_FILES "${CTEST_NOTES_FILES}" if(parallel GREATER 10) if(NOT CTEST_BUILD_COMMAND) set(CTEST_BUILD_COMMAND "make -j${parallel} -i") - endif(NOT CTEST_BUILD_COMMAND) + endif() message("Use parallel build") message("CTEST_BUILD_COMMAND: ${CTEST_BUILD_COMMAND}") message("CTEST_CONFIGURE_COMMAND: ${CTEST_CONFIGURE_COMMAND}") -endif(parallel GREATER 10) +endif() ################################################################### # Values for the cmake build