From 65356e6592255b011dff629cbce82e73708b018f Mon Sep 17 00:00:00 2001 From: rachguo Date: Mon, 20 Nov 2023 14:13:22 -0800 Subject: [PATCH] configure optional exclude macos target for not pod onnxruntime-c --- .../ios/ios_package_test/Podfile.template | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/onnxruntime/test/platform/ios/ios_package_test/Podfile.template b/onnxruntime/test/platform/ios/ios_package_test/Podfile.template index dbeead488c596..3f9c50cc23b10 100644 --- a/onnxruntime/test/platform/ios/ios_package_test/Podfile.template +++ b/onnxruntime/test/platform/ios/ios_package_test/Podfile.template @@ -1,3 +1,10 @@ +def should_exclude_macos_target + if '@C_POD_NAME@' != 'onnxruntime-c' + return true + end + return false +end + target 'ios_package_test' do # Comment the next line if you don't want to use dynamic frameworks use_frameworks! @@ -10,16 +17,18 @@ target 'ios_package_test' do end end -target 'macos_package_test' do - # Comment the next line if you don't want to use dynamic frameworks - use_frameworks! +unless should_exclude_macos_target + target 'macos_package_test' do + # Comment the next line if you don't want to use dynamic frameworks + use_frameworks! - platform :osx, '11.0' + platform :osx, '11.0' - target 'macos_package_testUITests' do - inherit! :search_paths - pod '@C_POD_NAME@', :podspec => '@C_POD_PODSPEC@' - end + target 'macos_package_testUITests' do + inherit! :search_paths + pod '@C_POD_NAME@', :podspec => '@C_POD_PODSPEC@' + end + end end # This is to prevent the pods to be code signed if enabled