mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Fixing iOS clang warnings, part 3
This commit is contained in:
@@ -106,6 +106,10 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
add_extra_compiler_option(-march=i686)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
add_extra_compiler_option(-Wno-semicolon-before-method-body)
|
||||
endif()
|
||||
|
||||
# Other optimizations
|
||||
if(ENABLE_OMIT_FRAME_POINTER)
|
||||
add_extra_compiler_option(-fomit-frame-pointer)
|
||||
|
||||
@@ -249,9 +249,9 @@ macro(add_apple_compiler_options the_module)
|
||||
if("${source}" MATCHES "\\.mm$")
|
||||
get_source_file_property(flags "${source}" COMPILE_FLAGS)
|
||||
if(flags)
|
||||
set(flags "${_flags} -fobjc-exceptions -Wno-semicolon-before-method-body")
|
||||
set(flags "${_flags} -fobjc-exceptions")
|
||||
else()
|
||||
set(flags "-fobjc-exceptions -Wno-semicolon-before-method-body")
|
||||
set(flags "-fobjc-exceptions")
|
||||
endif()
|
||||
|
||||
set_source_files_properties("${source}" PROPERTIES COMPILE_FLAGS "${flags}")
|
||||
|
||||
Reference in New Issue
Block a user