Backported several changes from master branch:

- #3771 - inline round on ARM
- #5633 - documentation for MSER
- #5666 - run.py fixes
This commit is contained in:
Maksim Shabunin
2015-02-27 18:59:55 +03:00
parent 2897da037e
commit 7cb78451d1
5 changed files with 89 additions and 29 deletions

View File

@@ -152,7 +152,7 @@ parse_patterns = (
{'name': "opencv_home", 'default': None, 'pattern': re.compile(r"^OpenCV_SOURCE_DIR:STATIC=(.+)$")},
{'name': "opencv_build", 'default': None, 'pattern': re.compile(r"^OpenCV_BINARY_DIR:STATIC=(.+)$")},
{'name': "tests_dir", 'default': None, 'pattern': re.compile(r"^EXECUTABLE_OUTPUT_PATH:PATH=(.+)$")},
{'name': "build_type", 'default': "Release", 'pattern': re.compile(r"^CMAKE_BUILD_TYPE:STRING=(.*)$")},
{'name': "build_type", 'default': "Release", 'pattern': re.compile(r"^CMAKE_BUILD_TYPE:\w+=(.*)$")},
{'name': "git_executable", 'default': None, 'pattern': re.compile(r"^GIT_EXECUTABLE:FILEPATH=(.*)$")},
{'name': "cxx_flags", 'default': "", 'pattern': re.compile(r"^CMAKE_CXX_FLAGS:STRING=(.*)$")},
{'name': "cxx_flags_debug", 'default': "", 'pattern': re.compile(r"^CMAKE_CXX_FLAGS_DEBUG:STRING=(.*)$")},
@@ -174,17 +174,19 @@ parse_patterns = (
)
class CMakeCache:
def __init__(self):
def __init__(self, cfg = None):
self.setDefaultAttrs()
self.cmake_home_vcver = None
self.opencv_home_vcver = None
self.featuresSIMD = None
self.main_modules = []
if cfg:
self.build_type = cfg
def setDummy(self, path):
self.tests_dir = os.path.normpath(path)
def read(self, path, fname, cfg):
def read(self, path, fname):
rx = re.compile(r'^opencv_(\w+)_SOURCE_DIR:STATIC=(.*)$')
module_paths = {} # name -> path
with open(fname, "rt") as cachefile:
@@ -213,10 +215,7 @@ class CMakeCache:
# fix VS test binary path (add Debug or Release)
if "Visual Studio" in self.cmake_generator:
if cfg:
self.tests_dir = os.path.join(self.tests_dir, self.options.configuration)
else:
self.tests_dir = os.path.join(self.tests_dir, self.build_type)
self.tests_dir = os.path.join(self.tests_dir, self.build_type)
self.cmake_home_vcver = readGitVersion(self.git_executable, self.cmake_home)
if self.opencv_home == self.cmake_home: