File tree Expand file tree Collapse file tree 4 files changed +21
-4
lines changed Expand file tree Collapse file tree 4 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,9 @@ def main():
3131 # Replace GCC warning argument with one Clang recognizes
3232 elif arg == "-Wno-maybe-uninitialized" :
3333 out_args .append ("-Wno-uninitialized" )
34+ # Skip GCC-specific warning argument
35+ elif arg == "-Wno-error=restrict" :
36+ pass
3437 else :
3538 out_args .append (arg )
3639
Original file line number Diff line number Diff line change @@ -181,7 +181,11 @@ tasks.register('deployStatic') {
181181model {
182182 components {
183183 benchmarkCpp(NativeExecutableSpec ) {
184- targetBuildTypes ' debug'
184+ if (project. hasProperty(' ciDebugOnly' )) {
185+ targetBuildTypes ' debug'
186+ } else {
187+ targetBuildTypes ' release'
188+ }
185189 sources {
186190 cpp {
187191 source {
@@ -235,7 +239,11 @@ model {
235239 }
236240 }
237241 benchmarkCppStatic(NativeExecutableSpec ) {
238- targetBuildTypes ' debug'
242+ if (project. hasProperty(' ciDebugOnly' )) {
243+ targetBuildTypes ' debug'
244+ } else {
245+ targetBuildTypes ' release'
246+ }
239247 nativeUtils. excludeBinariesFromStrip(it)
240248 sources {
241249 cpp {
Original file line number Diff line number Diff line change @@ -39,12 +39,14 @@ nativeUtils.platformConfigs.each {
3939 }
4040}
4141
42- // Compress debug info on Linux
4342nativeUtils. platformConfigs. each {
4443 if (it. name. contains(' linux' )) {
44+ // Compress debug info on Linux
4545 it. cppCompiler. debugArgs. add(" -gz=zlib" )
4646 // Make warning in OpenCV 4.10 from GCC 15 not an error
4747 it. cppCompiler. args. add(" -Wno-error=overloaded-virtual" )
48+ // Make warning from Google Benchmark not an error
49+ it. cppCompiler. args. add(" -Wno-error=restrict" )
4850 }
4951}
5052
Original file line number Diff line number Diff line change @@ -148,7 +148,11 @@ model {
148148 // By default, a development executable will be generated. This is to help the case of
149149 // testing specific functionality of the library.
150150 " ${ nativeName} Dev" (NativeExecutableSpec ) {
151- targetBuildTypes ' debug'
151+ if (project. hasProperty(' ciDebugOnly' ) || project. hasProperty(' debugJNI' )) {
152+ targetBuildTypes ' debug'
153+ } else {
154+ targetBuildTypes ' release'
155+ }
152156 sources {
153157 cpp {
154158 source {
You can’t perform that action at this time.
0 commit comments