+
+if ($ENV{LYX_DEBUG_LATEX})
+ # Do not remove temporary files if one wants to examine them
+ # for example if setting the env-var LYX_DEBUG_LATEX
+ # This needs a remove all temp-dirs from time to time
+ # $ cd build-dir
+ # $ find autotests/out-home -name AbC_\* | xargs rm -rf
+else()
+ execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory "${TempDir}")
+endif()