diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index 3ab6bc1570..4bacb1d5de 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -336,9 +336,7 @@ set(MATLAB_VERSIONS_MAPPING # temporary folder for all Matlab runs set(_matlab_temporary_folder ${CMAKE_BINARY_DIR}/Matlab) -if(NOT EXISTS "${_matlab_temporary_folder}") - file(MAKE_DIRECTORY "${_matlab_temporary_folder}") -endif() +file(MAKE_DIRECTORY "${_matlab_temporary_folder}") #[=======================================================================[.rst: .. command:: matlab_get_version_from_release_name