Import LAPACK: CMAKE directory
authorMartin Köhler <koehlerm@mpi-magdeburg.mpg.de>
Wed, 26 Oct 2016 13:03:16 +0000 (15:03 +0200)
committerMartin Köhler <koehlerm@mpi-magdeburg.mpg.de>
Wed, 26 Oct 2016 13:03:16 +0000 (15:03 +0200)
lapack-netlib/CMAKE/CheckFortranTypeSizes.cmake
lapack-netlib/CMAKE/CheckTimeFunction.cmake
lapack-netlib/CMAKE/FortranMangling.cmake

index 1f410e3..9cc12ce 100644 (file)
@@ -18,7 +18,7 @@
 macro( _CHECK_FORTRAN_TYPE_SIZE _TYPE_NAME _TEST_SIZES )
 
   foreach( __TEST_SIZE ${_TEST_SIZES} )
-    set( __TEST_FILE ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortran${_TYPE_NAME}Size${__TEST_SIZE}.f90 )
+    set( __TEST_FILE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortran${_TYPE_NAME}Size${__TEST_SIZE}.f90 )
     file( WRITE ${__TEST_FILE} 
 "
        PROGRAM check_size
@@ -27,7 +27,7 @@ macro( _CHECK_FORTRAN_TYPE_SIZE _TYPE_NAME _TEST_SIZES )
          pa => a
        END PROGRAM
 ")
-    try_compile( SIZEOF_${_TYPE_NAME} ${PROJECT_BINARY_DIR} ${__TEST_FILE} )
+    try_compile( SIZEOF_${_TYPE_NAME} ${CMAKE_BINARY_DIR} ${__TEST_FILE} )
     if( SIZEOF_${_TYPE_NAME} )
       message( STATUS "Testing default ${_TYPE_NAME}*${__TEST_SIZE} - found" )
       set( SIZEOF_${_TYPE_NAME} ${__TEST_SIZE} CACHE INTERNAL "Size of the default ${_TYPE_NAME} type" FORCE )
index 1a65f24..350a591 100644 (file)
@@ -16,11 +16,11 @@ macro(CHECK_TIME_FUNCTION FUNCTION VARIABLE)
     if(RES)
       set(${VARIABLE} ${FUNCTION} CACHE INTERNAL "Have Fortran function ${FUNCTION}")
       message(STATUS "Looking for Fortran ${FUNCTION} - found")
-      file(APPEND ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+      file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
         "Fortran ${FUNCTION} exists. ${OUTPUT} \n\n")
     else(RES)
       message(STATUS "Looking for Fortran ${FUNCTION} - not found")
-      file(APPEND ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+      file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
         "Fortran ${FUNCTION} does not exist. \n ${OUTPUT} \n")
     endif(RES)
 endmacro(CHECK_TIME_FUNCTION)
index 538c802..98b8443 100644 (file)
@@ -43,7 +43,7 @@ MESSAGE(STATUS "Testing FORTRAN_MANGLING")
 MESSAGE(STATUS "Compiling Finface.f...")
 
     execute_process ( COMMAND  ${CMAKE_Fortran_COMPILER} ${F77_OPTION_COMPILE} ${PROJECT_SOURCE_DIR}/lapacke/mangling/Fintface.f
-      WORKING_DIRECTORY  ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
+      WORKING_DIRECTORY  ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
       OUTPUT_VARIABLE    OUTPUT
       RESULT_VARIABLE    RESULT
       ERROR_VARIABLE     ERROR)
@@ -58,7 +58,7 @@ MESSAGE(STATUS "Compiling Finface.f...")
 MESSAGE(STATUS "Compiling Cintface.c...")
 
     execute_process ( COMMAND  ${CMAKE_C_COMPILER} ${F77_OPTION_COMPILE} ${PROJECT_SOURCE_DIR}/lapacke/mangling/Cintface.c
-      WORKING_DIRECTORY  ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
+      WORKING_DIRECTORY  ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
       OUTPUT_VARIABLE    OUTPUT
       RESULT_VARIABLE    RESULT
       ERROR_VARIABLE     ERROR)
@@ -73,7 +73,7 @@ MESSAGE(STATUS "Compiling 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  ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
+      WORKING_DIRECTORY  ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
       OUTPUT_VARIABLE    OUTPUT
       RESULT_VARIABLE    RESULT
       ERROR_VARIABLE     ERROR)
@@ -88,7 +88,7 @@ MESSAGE(STATUS "Linking Finface.f and Cintface.c...")
 MESSAGE(STATUS "Running ./xintface...")
 
     execute_process ( COMMAND  ./xintface.exe
-      WORKING_DIRECTORY  ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
+      WORKING_DIRECTORY  ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp
       RESULT_VARIABLE xintface_RES
       OUTPUT_VARIABLE xintface_OUT
       ERROR_VARIABLE xintface_ERR)