diff --git a/cmake/modules/DunePythonTestCommand.cmake b/cmake/modules/DunePythonTestCommand.cmake index 60c7c35eaf541b0726858de53d00f8be05e2495f..18ee165b8fec7838f6c504ed2da1f65124e72628 100644 --- a/cmake/modules/DunePythonTestCommand.cmake +++ b/cmake/modules/DunePythonTestCommand.cmake @@ -37,8 +37,12 @@ function(dune_python_add_test) include(CMakeParseArguments) set(OPTION) set(SINGLE WORKING_DIRECTORY NAME) - set(MULTI SCRIPT LABELS) + set(MULTI SCRIPT COMMAND LABELS) + # set(MULTI COMMAND LABELS) cmake_parse_arguments(PYTEST "${OPTION}" "${SINGLE}" "${MULTI}" ${ARGN}) + if(PYTEST_COMMAND) + message(FATAL_ERROR "dune_python_add_test: COMMAND argument should not be used, use SCRIPT instead providing only the Python script and not the Python interpreter") + endif() if(PYTEST_UNPARSED_ARGUMENTS) message(WARNING "Unparsed arguments in dune_python_add_test: This often indicates typos!") endif()