Fix build warnings on MSVC x64 and OS X clang
This commit is contained in:
parent
a910360689
commit
22d33373fa
@ -97,7 +97,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
endif()
|
||||
|
||||
# We need pthread's
|
||||
if(UNIX AND NOT ANDROID)
|
||||
if(UNIX AND NOT ANDROID AND NOT (APPLE AND CMAKE_COMPILER_IS_CLANGCXX))
|
||||
add_extra_compiler_option(-pthread)
|
||||
endif()
|
||||
|
||||
|
@ -5,17 +5,17 @@ if(CMAKE_CL_64)
|
||||
set(MSVC64 1)
|
||||
endif()
|
||||
|
||||
if(NOT APPLE)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set(CMAKE_COMPILER_IS_GNUCXX 1)
|
||||
set(CMAKE_COMPILER_IS_CLANGCXX 1)
|
||||
set(ENABLE_PRECOMPILED_HEADERS OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
set(CMAKE_COMPILER_IS_GNUCC 1)
|
||||
set(CMAKE_COMPILER_IS_CLANGCC 1)
|
||||
set(ENABLE_PRECOMPILED_HEADERS OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set(CMAKE_COMPILER_IS_GNUCXX 1)
|
||||
set(CMAKE_COMPILER_IS_CLANGCXX 1)
|
||||
endif()
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
set(CMAKE_COMPILER_IS_GNUCC 1)
|
||||
set(CMAKE_COMPILER_IS_CLANGCC 1)
|
||||
endif()
|
||||
|
||||
if((CMAKE_COMPILER_IS_CLANGCXX OR CMAKE_COMPILER_IS_CLANGCC) AND NOT CMAKE_GENERATOR MATCHES "Xcode")
|
||||
set(ENABLE_PRECOMPILED_HEADERS OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
|
@ -230,7 +230,7 @@ void detectAndDraw( Mat& img, CascadeClassifier& cascade,
|
||||
// The number of detected neighbors depends on image size (and also illumination, etc.). The
|
||||
// following steps use a floating minimum and maximum of neighbors. Intensity thus estimated will be
|
||||
//accurate only after a first smile has been displayed by the user.
|
||||
const int smile_neighbors = nestedObjects.size();
|
||||
const int smile_neighbors = (int)nestedObjects.size();
|
||||
static int max_neighbors=-1;
|
||||
static int min_neighbors=-1;
|
||||
if (min_neighbors == -1) min_neighbors = smile_neighbors;
|
||||
|
Loading…
x
Reference in New Issue
Block a user