include(${CHEETAH_OUTPUT_VAR_FILE})

foreach(CHEETAH_VARIABLE ${CHEETAH_ENVIRONMENT})
  string(REGEX REPLACE "^([^=]+)=(.+)$" "\\1" CHEETAH_VARNAME "${CHEETAH_VARIABLE}")
  string(REGEX REPLACE "^([^=]+)=(.+)$" "\\2" CHEETAH_VALUE "${CHEETAH_VARIABLE}")
  set(ENV{${CHEETAH_VARNAME}} ${CHEETAH_VALUE})
endforeach()

execute_process(COMMAND ${CHEETAH_COMMAND} fill --quiet --odir=${CHEETAH_OUTPUT_DIRECTORY} ${CHEETAH_OPTIONS} ${CHEETAH_SOURCE})
