3
0
mirror of https://github.com/triqs/dft_tools synced 2024-07-11 05:43:48 +02:00

[cmake] Use PYTHON_EXECUTABLE over PYTHON_INTERPRETER to be consistent with gtest, pybind ..

This commit is contained in:
Nils Wentzell 2020-04-03 16:22:09 -04:00
parent b70084789d
commit 2d4b9c6298
2 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
# Build googletest
set(PYTHON_EXECUTABLE ${TRIQS_PYTHON_EXECUTABLE})
add_subdirectory(gtest EXCLUDE_FROM_ALL)
# Copy h5 files to binary dir

View File

@ -10,6 +10,6 @@ set(all_tests Basic)
foreach(test ${all_tests})
get_filename_component(test_name ${test} NAME_WE)
get_filename_component(test_dir ${test} DIRECTORY)
add_test(NAME Py_${test_name} COMMAND ${TRIQS_PYTHON_INTERPRETER} ${CMAKE_CURRENT_SOURCE_DIR}/${test_dir}/${test_name}.py WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${test_dir})
add_test(NAME Py_${test_name} COMMAND ${TRIQS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${test_dir}/${test_name}.py WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${test_dir})
set_property(TEST Py_${test_name} APPEND PROPERTY ENVIRONMENT PYTHONPATH=${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH} ${SANITIZER_RT_PRELOAD})
endforeach()