Ah, I see. I’d have struggled to work that out from the documentation, but yes this works on both platforms:
add_test(NAME SimplePythonTest
COMMAND ${CMAKE_COMMAND} -E env --unset=PYTHONHOME --unset=PYTHONPATH ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/SimpleTest.py
WORKING_DIRECTORY ${my_home})
Thank you.