configure_file(
"${LAPACK_SOURCE_DIR}/CTestCustom.cmake.in"
"${LAPACK_BINARY_DIR}/CTestCustom.cmake"
- COPYONLY
+ @ONLY
)
# Add the CMake directory for custon CMake modules
endif()
# Get Python
-find_package(PythonInterp)
-message(STATUS "Looking for Python found - ${PYTHONINTERP_FOUND}")
+message(STATUS "Looking for Python greater than 2.6 - ${PYTHONINTERP_FOUND}")
+find_package(PythonInterp 2.7) # lapack_testing.py uses features from python 2.7 and greater
if (PYTHONINTERP_FOUND)
message(STATUS "Using Python version ${PYTHON_VERSION_STRING}")
+else()
+ message(STATUS "No suitable Python version found, so skipping summary tests.")
endif()
# --------------------------------------------------
"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
+# Only rung post test if suitable python interpreter was found
+set(PYTHONINTERP_FOUND @PYTHONINTERP_FOUND@)
+set(PYTHON_EXECUTABLE @PYTHON_EXECUTABLE@)
+if(PYTHONINTERP_FOUND)
+ set(CTEST_CUSTOM_POST_TEST "${PYTHON_EXECUTABLE} ./lapack_testing.py -s -d TESTING")
+endif()
+
endif()
# ==============================================================================
-
-execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${LAPACK_SOURCE_DIR}/lapack_testing.py ${LAPACK_BINARY_DIR})
- add_test(
- NAME LAPACK_Test_Summary
- WORKING_DIRECTORY ${LAPACK_BINARY_DIR}
- COMMAND ${PYTHON_EXECUTABLE} "lapack_testing.py"
- )
+# Only run this test if python 2.7 or greater is found
+if(PYTHONINTERP_FOUND)
+ message(STATUS "Running Summary")
+ execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${LAPACK_SOURCE_DIR}/lapack_testing.py ${LAPACK_BINARY_DIR})
+ add_test(
+ NAME LAPACK_Test_Summary
+ WORKING_DIRECTORY ${LAPACK_BINARY_DIR}
+ COMMAND ${PYTHON_EXECUTABLE} "lapack_testing.py"
+ )
+endif()