File tree 3 files changed +22
-11
lines changed
3 files changed +22
-11
lines changed Original file line number Diff line number Diff line change 37
37
configure_file (
38
38
"${LAPACK_SOURCE_DIR} /CTestCustom.cmake.in"
39
39
"${LAPACK_BINARY_DIR} /CTestCustom.cmake"
40
- COPYONLY
40
+ @ONLY
41
41
)
42
42
43
43
# Add the CMake directory for custon CMake modules
@@ -85,10 +85,12 @@ if ( CMAKE_Fortran_COMPILER_ID STREQUAL "Compaq" )
85
85
endif ()
86
86
87
87
# Get Python
88
- find_package (PythonInterp )
89
- message ( STATUS "Looking for Python found - ${PYTHONINTERP_FOUND} " )
88
+ message ( STATUS "Looking for Python greater than 2.6 - ${PYTHONINTERP_FOUND} " )
89
+ find_package (PythonInterp 2.7) # lapack_testing.py uses features from python 2.7 and greater
90
90
if (PYTHONINTERP_FOUND)
91
91
message (STATUS "Using Python version ${PYTHON_VERSION_STRING} " )
92
+ else ()
93
+ message (STATUS "No suitable Python version found, so skipping summary tests." )
92
94
endif ()
93
95
# --------------------------------------------------
94
96
Original file line number Diff line number Diff line change @@ -43,4 +43,10 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
43
43
"Character string truncated to length 1 on assignment"
44
44
)
45
45
46
- set (CTEST_CUSTOM_POST_TEST "./lapack_testing.py -s -d TESTING" )
46
+ # Only rung post test if suitable python interpreter was found
47
+ set (PYTHONINTERP_FOUND @PYTHONINTERP_FOUND@)
48
+ set (PYTHON_EXECUTABLE @PYTHON_EXECUTABLE@)
49
+ if (PYTHONINTERP_FOUND)
50
+ set (CTEST_CUSTOM_POST_TEST "${PYTHON_EXECUTABLE} ./lapack_testing.py -s -d TESTING" )
51
+ endif ()
52
+
Original file line number Diff line number Diff line change @@ -307,10 +307,13 @@ if (BUILD_COMPLEX)
307
307
endif ()
308
308
309
309
# ==============================================================================
310
-
311
- execute_process (COMMAND ${CMAKE_COMMAND} -E copy ${LAPACK_SOURCE_DIR} /lapack_testing.py ${LAPACK_BINARY_DIR} )
312
- add_test (
313
- NAME LAPACK_Test_Summary
314
- WORKING_DIRECTORY ${LAPACK_BINARY_DIR}
315
- COMMAND ${PYTHON_EXECUTABLE} "lapack_testing.py"
316
- )
310
+ # Only run this test if python 2.7 or greater is found
311
+ if (PYTHONINTERP_FOUND)
312
+ message (STATUS "Running Summary" )
313
+ execute_process (COMMAND ${CMAKE_COMMAND} -E copy ${LAPACK_SOURCE_DIR} /lapack_testing.py ${LAPACK_BINARY_DIR} )
314
+ add_test (
315
+ NAME LAPACK_Test_Summary
316
+ WORKING_DIRECTORY ${LAPACK_BINARY_DIR}
317
+ COMMAND ${PYTHON_EXECUTABLE} "lapack_testing.py"
318
+ )
319
+ endif ()
You can’t perform that action at this time.
0 commit comments