diff --git a/bindings/matlab/tests/CMakeLists.txt b/bindings/matlab/tests/CMakeLists.txt index c8c3c57dfce..122e57baf5b 100644 --- a/bindings/matlab/tests/CMakeLists.txt +++ b/bindings/matlab/tests/CMakeLists.txt @@ -11,7 +11,7 @@ if (IDYNTREE_USES_MATLAB AND NOT IDYNTREE_DISABLE_MATLAB_TESTS) find_package(Matlab REQUIRED COMPONENTS MAIN_PROGRAM) add_test(NAME matlab_idyntree_tests - COMMAND ${Matlab_MAIN_PROGRAM} -nodisplay -nodesktop -nojvm -r "addpath('$');addpath('${MEX_BINDINGS_SOURCE_DIR}');addpath('${MATLAB_WRAPPERS_BINDINGS_SOURCE_DIR}');addpath('${CMAKE_CURRENT_SOURCE_DIR}/');addpath(genpath('${IDYNTREE_INTERNAL_MOXUNIT_PATH}'));success=moxunit_runtests('${CMAKE_CURRENT_SOURCE_DIR}','-verbose');exit(~success);") + COMMAND ${Matlab_MAIN_PROGRAM} -nodisplay -nodesktop -nojvm -batch "addpath('$');addpath('${MEX_BINDINGS_SOURCE_DIR}');addpath('${MATLAB_WRAPPERS_BINDINGS_SOURCE_DIR}');addpath('${CMAKE_CURRENT_SOURCE_DIR}/');addpath(genpath('${IDYNTREE_INTERNAL_MOXUNIT_PATH}'));success=moxunit_runtests('${CMAKE_CURRENT_SOURCE_DIR}','-verbose');exit(~success);") endif() if (IDYNTREE_USES_OCTAVE)