# Generates the CTDs for the tools
MESSAGE(STATUS "Generating CTDs")
FILE(GLOB BALL_TOOLS "@TOOLS_RUNTIME_OUTPUT_DIRECTORY@/*")
FOREACH(TOOL ${BALL_TOOLS})
	GET_FILENAME_COMPONENT(TOOL_NAME ${TOOL} NAME)
	EXECUTE_PROCESS(COMMAND "${TOOL}" -write_par "@CTD_OUTFILE_DIR@/${TOOL_NAME}.ctd"
		OUTPUT_FILE "@LOGFILE_DIR@/ctd_generation_out.log"
		ERROR_FILE "@LOGFILE_DIR@/ctd_generation_err.log"
		WORKING_DIRECTORY @PROJECT_BINARY_DIR@
	)
ENDFOREACH()