cmake: Added return/clear variable to function
cmake: Added return/clear variable to function

Made sure output_variable gets cleared for case where
target compiler is not supported.

Signed-off-by: Noel Eck <1e36ab6ededef40f3f16bdbc1b09eee72c5d08cf@intel.com>

Jon-ICS/upm,malikabhi05/upm,sasmita/upm,g-vidal/upm,Jon-ICS/upm,pylbert/upm,g-vidal/upm,intel-iot-devkit/upm,intel-iot-devkit/upm,jontrulson/upm,intel-iot-devkit/upm,stefan-andritoiu/upm,whbruce/upm,Jon-ICS/upm,sasmita/upm,skiselev/upm,sasmita/upm,Propanu/upm,Propanu/upm,pylbert/upm,jontrulson/upm,Jon-ICS/upm,spitfire88/upm,stefan-andritoiu/upm,whbruce/upm,skiselev/upm,nitirohilla/upm,Propanu/upm,sasmita/upm,malikabhi05/upm,malikabhi05/upm,Jon-ICS/upm,spitfire88/upm,spitfire88/upm,g-vidal/upm,stefan-andritoiu/upm,jontrulson/upm,g-vidal/upm,Propanu/upm,stefan-andritoiu/upm,spitfire88/upm,stefan-andritoiu/upm,pylbert/upm,nitirohilla/upm,malikabhi05/upm,skiselev/upm,nitirohilla/upm,intel-iot-devkit/upm,intel-iot-devkit/upm,skiselev/upm,pylbert/upm,malikabhi05/upm,nitirohilla/upm,skiselev/upm,jontrulson/upm,skiselev/upm,Propanu/upm,pylbert/upm,intel-iot-devkit/upm,nitirohilla/upm,whbruce/upm,spitfire88/upm,malikabhi05/upm,Propanu/upm,jontrulson/upm,pylbert/upm,whbruce/upm,sasmita/upm,stefan-andritoiu/upm,whbruce/upm,g-vidal/upm,g-vidal/upm