mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 20:50:25 +08:00
build: eliminate Xcode 9.1 warnings
- 3rdparty/libjasper/jas_getopt.c:129:25: warning: this function declaration is not a prototype [-Wstrict-prototypes] - clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument]
This commit is contained in:
parent
bc547c4290
commit
f7913e2c84
2
3rdparty/libjasper/CMakeLists.txt
vendored
2
3rdparty/libjasper/CMakeLists.txt
vendored
@ -26,7 +26,7 @@ endif(WIN32 AND NOT MINGW)
|
|||||||
ocv_warnings_disable(CMAKE_C_FLAGS -Wno-implicit-function-declaration -Wno-uninitialized -Wmissing-prototypes
|
ocv_warnings_disable(CMAKE_C_FLAGS -Wno-implicit-function-declaration -Wno-uninitialized -Wmissing-prototypes
|
||||||
-Wno-unused-but-set-parameter -Wmissing-declarations -Wunused -Wshadow
|
-Wno-unused-but-set-parameter -Wmissing-declarations -Wunused -Wshadow
|
||||||
-Wsign-compare -Wstrict-overflow -Wpointer-compare)
|
-Wsign-compare -Wstrict-overflow -Wpointer-compare)
|
||||||
ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-parameter) # clang
|
ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-parameter -Wstrict-prototypes) # clang
|
||||||
ocv_warnings_disable(CMAKE_C_FLAGS /wd4013 /wd4018 /wd4101 /wd4244 /wd4267 /wd4715) # vs2005
|
ocv_warnings_disable(CMAKE_C_FLAGS /wd4013 /wd4018 /wd4101 /wd4244 /wd4267 /wd4715) # vs2005
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
|
@ -160,7 +160,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
|||||||
# Other optimizations
|
# Other optimizations
|
||||||
if(ENABLE_OMIT_FRAME_POINTER)
|
if(ENABLE_OMIT_FRAME_POINTER)
|
||||||
add_extra_compiler_option(-fomit-frame-pointer)
|
add_extra_compiler_option(-fomit-frame-pointer)
|
||||||
else()
|
elseif(DEFINED ENABLE_OMIT_FRAME_POINTER)
|
||||||
add_extra_compiler_option(-fno-omit-frame-pointer)
|
add_extra_compiler_option(-fno-omit-frame-pointer)
|
||||||
endif()
|
endif()
|
||||||
if(ENABLE_FAST_MATH)
|
if(ENABLE_FAST_MATH)
|
||||||
|
@ -51,7 +51,10 @@ set (no_warn "-Wno-unused-function -Wno-overloaded-virtual")
|
|||||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${no_warn}")
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${no_warn}")
|
||||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -fvisibility=hidden -fvisibility-inlines-hidden ${no_warn}")
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -fvisibility=hidden -fvisibility-inlines-hidden ${no_warn}")
|
||||||
|
|
||||||
set (CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O3 -fomit-frame-pointer -ffast-math")
|
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O3 -ffast-math")
|
||||||
|
if(NOT IOS_ARCH STREQUAL "armv7")
|
||||||
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fomit-frame-pointer")
|
||||||
|
endif()
|
||||||
|
|
||||||
if (HAVE_FLAG_SEARCH_PATHS_FIRST)
|
if (HAVE_FLAG_SEARCH_PATHS_FIRST)
|
||||||
set (CMAKE_C_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
|
set (CMAKE_C_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
|
||||||
|
Loading…
Reference in New Issue
Block a user