Suppressed hundreds of useless MSVC warnings (can be reenabled setting cmake variable ENABLE_NOISY_WARNINGS to ON). Fixed some of remaining warnings.
This commit is contained in:
@@ -3,7 +3,7 @@ if(IOS)
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
set(OPENCV_MODULE_TYPE STATIC)
|
||||
set(OPENCV_MODULE_TYPE STATIC)
|
||||
endif()
|
||||
|
||||
set(the_description "The ts module")
|
||||
@@ -13,12 +13,12 @@ ocv_module_include_directories()
|
||||
ocv_create_module()
|
||||
|
||||
if(BUILD_SHARED_LIBS AND NOT MINGW)
|
||||
add_definitions(-DGTEST_CREATE_SHARED_LIBRARY=1)
|
||||
if (MSVC)
|
||||
add_definitions( "/wd4251 /wd4275")
|
||||
endif()
|
||||
add_definitions(-DGTEST_CREATE_SHARED_LIBRARY=1)
|
||||
if (MSVC AND NOT ENABLE_NOISY_WARNINGS)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4275")
|
||||
endif()
|
||||
else()
|
||||
add_definitions(-DGTEST_CREATE_SHARED_LIBRARY=0)
|
||||
add_definitions(-DGTEST_CREATE_SHARED_LIBRARY=0)
|
||||
endif()
|
||||
|
||||
ocv_add_precompiled_headers(${the_module})
|
||||
|
@@ -147,7 +147,7 @@ void Regression::init(const std::string& testSuitName, const std::string& ext)
|
||||
storageOutPath += ext;
|
||||
}
|
||||
}
|
||||
catch(cv::Exception& ex)
|
||||
catch(cv::Exception&)
|
||||
{
|
||||
LOGE("Failed to open sanity data for reading: %s", storageInPath.c_str());
|
||||
}
|
||||
|
Reference in New Issue
Block a user