From: Роман Михайлович Русяев/AI Tools Lab /SRR/Staff Engineer/삼성전자 Date: Fri, 21 Sep 2018 12:33:53 +0000 (+0300) Subject: Prevent crash build if components are unavailable (#1628) X-Git-Tag: nncc_backup~1708 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=caad8536f73b350603fb87b2c02bd57b6c34745d;p=platform%2Fcore%2Fml%2Fnnfw.git Prevent crash build if components are unavailable (#1628) * fix linking failure if frontends are unavailable Signed-off-by: Roman Rusyaev --- diff --git a/contrib/nnc/driver/Driver.cpp b/contrib/nnc/driver/Driver.cpp index 067feee..337ad36 100644 --- a/contrib/nnc/driver/Driver.cpp +++ b/contrib/nnc/driver/Driver.cpp @@ -61,11 +61,15 @@ static void registerFrontendPass() if ( clopt::caffeFrontend ) { +#ifdef NNC_FRONTEND_CAFFE_ENABLED pass = &caffe::CaffeFrontend::getInstance(); +#endif // NNC_FRONTEND_CAFFE_ENABLED } else if ( clopt::tflFrontend ) { +#ifdef NNC_FRONTEND_TFLITE_ENABLED pass = &tflite::TFLiteFrontend::getInstance(); +#endif // NNC_FRONTEND_TFLITE_ENABLED } else {