Skip to content

Commit

Permalink
[libpgmath] Use Python 3 to run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanpkc committed Mar 22, 2021
1 parent b8b4914 commit 4bb8c37
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions runtime/libpgmath/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
endif()

if (LIBPGMATH_STANDALONE_BUILD)
include(FindPythonInterp)
if( NOT PYTHONINTERP_FOUND )
message(WARNING "Failed to find python interpreter. "
include(FindPython3)
if( NOT Python3_Interpreter_FOUND )
message(WARNING "Failed to find Python 3 interpreter. "
"Libpgmath test suite will be disabled.")
set(LLVM_INCLUDE_TESTS OFF)
endif()
Expand Down
8 changes: 4 additions & 4 deletions runtime/libpgmath/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#

include(FindPythonInterp)
include(FindPython3)
include(CheckTypeSize)
include(CheckLibraryExists)

if(NOT PYTHONINTERP_FOUND)
libpgmath_warning_say("Could not find Python.")
if(NOT Python3_Interpreter_FOUND)
libpgmath_warning_say("Could not find Python 3.")
libpgmath_warning_say("The check-pgm target will not be available!")
return()
endif()
Expand Down Expand Up @@ -63,7 +63,7 @@ if(${LIBPGMATH_STANDALONE_BUILD})
"Default options for lit")
separate_arguments(LIBPGMATH_LIT_ARGS)
add_custom_target(check-lib${LIBPGMATH_LIBRARY_NAME}
COMMAND ${PYTHON_EXECUTABLE} ${LIBPGMATH_LLVM_LIT_EXECUTABLE} ${LIBPGMATH_LIT_ARGS} ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${Python3_EXECUTABLE} ${LIBPGMATH_LLVM_LIT_EXECUTABLE} ${LIBPGMATH_LIT_ARGS} ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Running libpgmath tests"
${cmake_3_2_USES_TERMINAL}
DEPENDS ${LIBPGMATH_LIBRARY_NAME})
Expand Down

0 comments on commit 4bb8c37

Please sign in to comment.