Revert "Move CMake files to a subdirectory"
authorjulie <julielangou@users.noreply.github.com>
Mon, 7 Feb 2011 14:54:09 +0000 (14:54 +0000)
committerjulie <julielangou@users.noreply.github.com>
Mon, 7 Feb 2011 14:54:09 +0000 (14:54 +0000)
This reverts commit bc425c443232cf9737afcce38753f79963d31e0a.

CMAKE/CheckTimeFunction.cmake [deleted file]
CMAKE/lapack-config-build.cmake.in [deleted file]
CMAKE/lapack-config-install.cmake.in [deleted file]
CMAKE/lapack-config-version.cmake.in [deleted file]
CMakeLists.txt
CheckTimeFunction.cmake [new file with mode: 0644]
lapack-config-install.cmake.in [new file with mode: 0644]
lapack-config-version.cmake.in [new file with mode: 0644]
lapack-config.cmake.in [new file with mode: 0644]

diff --git a/CMAKE/CheckTimeFunction.cmake b/CMAKE/CheckTimeFunction.cmake
deleted file mode 100644 (file)
index 350a591..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-# - Check if the Fortran function exists.
-# CHECK_TIME_FUNCTION(FUNCTION VARIABLE TYPE)
-# - macro which checks if the Fortran function exists
-#  FUNCTION - the name of the Fortran function
-#  VARIABLE - variable to store the result
-#
-
-macro(CHECK_TIME_FUNCTION FUNCTION VARIABLE)
-
-    try_compile(RES
-    ${PROJECT_BINARY_DIR}/INSTALL
-    ${PROJECT_SOURCE_DIR}/INSTALL
-    TIMING secondtst_${FUNCTION}
-    OUTPUT_VARIABLE OUTPUT)
-
-    if(RES)
-      set(${VARIABLE} ${FUNCTION} CACHE INTERNAL "Have Fortran function ${FUNCTION}")
-      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)
-      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)
-
-
diff --git a/CMAKE/lapack-config-build.cmake.in b/CMAKE/lapack-config-build.cmake.in
deleted file mode 100644 (file)
index 8d60cc8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-include("@LAPACK_BINARY_DIR@/lapack-targets.cmake")
diff --git a/CMAKE/lapack-config-install.cmake.in b/CMAKE/lapack-config-install.cmake.in
deleted file mode 100644 (file)
index 0c55fc1..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-get_filename_component(_SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${_SELF_DIR}/lapack-targets.cmake)
diff --git a/CMAKE/lapack-config-version.cmake.in b/CMAKE/lapack-config-version.cmake.in
deleted file mode 100644 (file)
index 2caeb4a..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-set(PACKAGE_VERSION "@LAPACK_VERSION@")
-if(NOT ${PACKAGE_FIND_VERSION} VERSION_GREATER ${PACKAGE_VERSION})
-  set(PACKAGE_VERSION_COMPATIBLE 1)
-  if(${PACKAGE_FIND_VERSION} VERSION_EQUAL ${PACKAGE_VERSION})
-    set(PACKAGE_VERSION_EXACT 1)
-  endif()
-endif()
-
index 2a9c4fc5fe3a6773d878afdc122420f0b81be7c1..8bc46eea9b8fb51c3c9e5933bd79d7df60fba86f 100644 (file)
@@ -33,6 +33,8 @@ include(CTest)
 enable_testing()
 # --------------------------------------------------
 
+set(CMAKE_MODULE_PATH ${LAPACK_SOURCE_DIR} ${CMAKE_MODULE_PATH})
+
 # Organize output files.  On Windows this also keeps .dll files next
 # to the .exe files that need them, making tests easy to run.
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LAPACK_BINARY_DIR}/bin)
@@ -149,9 +151,9 @@ if( NOT BLAS_FOUND )
 else( NOT BLAS_FOUND )
   export(TARGETS lapack FILE lapack-targets.cmake)
 endif( NOT BLAS_FOUND )
-configure_file(${LAPACK_SOURCE_DIR}/CMAKE/lapack-config-version.cmake.in
+configure_file(${LAPACK_SOURCE_DIR}/lapack-config-version.cmake.in
   ${LAPACK_BINARY_DIR}/lapack-config-version.cmake @ONLY)
-configure_file(${LAPACK_SOURCE_DIR}/CMAKE/lapack-config-build.cmake.in
+configure_file(${LAPACK_SOURCE_DIR}/lapack-config.cmake.in
   ${LAPACK_BINARY_DIR}/lapack-config.cmake @ONLY)
 
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapack.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapack.pc)
@@ -160,7 +162,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapack.pc.in ${CMAKE_CURRENT_BINARY_D
   DESTINATION ${PKG_CONFIG_DIR}
    )
 
-configure_file(${LAPACK_SOURCE_DIR}/CMAKE/lapack-config-install.cmake.in
+configure_file(${LAPACK_SOURCE_DIR}/lapack-config-install.cmake.in
   ${LAPACK_BINARY_DIR}/CMakeFiles/lapack-config.cmake @ONLY)
 install(FILES
   ${LAPACK_BINARY_DIR}/CMakeFiles/lapack-config.cmake
diff --git a/CheckTimeFunction.cmake b/CheckTimeFunction.cmake
new file mode 100644 (file)
index 0000000..55016b9
--- /dev/null
@@ -0,0 +1,28 @@
+# - Check if the Fortran function exists.
+# CHECK_TIME_FUNCTION(FUNCTION VARIABLE TYPE)
+# - macro which checks if the Fortran function exists
+#  FUNCTION - the name of the Fortran function
+#  VARIABLE - variable to store the result
+#
+
+macro(CHECK_TIME_FUNCTION FUNCTION VARIABLE)
+
+    try_compile(RES
+    ${PROJECT_BINARY_DIR}/INSTALL
+    ${PROJECT_SOURCE_DIR}/INSTALL
+    TIMING secondtst_${FUNCTION}
+    OUTPUT_VARIABLE OUTPUT)
+
+    if(RES)
+      set(${VARIABLE} ${FUNCTION} CACHE INTERNAL "Have Fortran function ${FUNCTION}")
+      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)
+      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)
+
+
diff --git a/lapack-config-install.cmake.in b/lapack-config-install.cmake.in
new file mode 100644 (file)
index 0000000..0c55fc1
--- /dev/null
@@ -0,0 +1,2 @@
+get_filename_component(_SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+include(${_SELF_DIR}/lapack-targets.cmake)
diff --git a/lapack-config-version.cmake.in b/lapack-config-version.cmake.in
new file mode 100644 (file)
index 0000000..2caeb4a
--- /dev/null
@@ -0,0 +1,8 @@
+set(PACKAGE_VERSION "@LAPACK_VERSION@")
+if(NOT ${PACKAGE_FIND_VERSION} VERSION_GREATER ${PACKAGE_VERSION})
+  set(PACKAGE_VERSION_COMPATIBLE 1)
+  if(${PACKAGE_FIND_VERSION} VERSION_EQUAL ${PACKAGE_VERSION})
+    set(PACKAGE_VERSION_EXACT 1)
+  endif()
+endif()
+
diff --git a/lapack-config.cmake.in b/lapack-config.cmake.in
new file mode 100644 (file)
index 0000000..8d60cc8
--- /dev/null
@@ -0,0 +1 @@
+include("@LAPACK_BINARY_DIR@/lapack-targets.cmake")