Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
6f99447f
O
Opencv
项目概览
Greenplum
/
Opencv
11 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6f99447f
编写于
1月 24, 2012
作者:
A
Andrey Kamaev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed compiler flags caching in cmake
上级
2042e99c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
78 addition
and
74 deletion
+78
-74
CMakeLists.txt
CMakeLists.txt
+53
-53
modules/ts/misc/run.py
modules/ts/misc/run.py
+25
-21
未找到文件。
CMakeLists.txt
浏览文件 @
6f99447f
...
...
@@ -1065,78 +1065,78 @@ if (WIN32 AND ${CMAKE_GENERATOR} MATCHES "(MinGW)|(MSYS)")
set
(
CMAKE_CXX_FLAGS_RELEASE
"-O2 -DNDEBUG"
CACHE STRING
""
)
endif
()
set
(
EXTRA_C_FLAGS
""
)
set
(
EXTRA_C_FLAGS_RELEASE
""
)
set
(
EXTRA_C_FLAGS_DEBUG
""
)
set
(
EXTRA_EXE_LINKER_FLAGS
""
)
set
(
EXTRA_EXE_LINKER_FLAGS_RELEASE
""
)
set
(
EXTRA_EXE_LINKER_FLAGS_DEBUG
""
)
set
(
OPENCV_EXTRA_C_FLAGS
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
)
set
(
OPENCV_EXTRA_C_FLAGS_DEBUG
)
set
(
OPENCV_EXTRA_EXE_LINKER_FLAGS
)
set
(
OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE
)
set
(
OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG
)
if
(
MSVC
)
set
(
EXTRA_C_FLAGS
"
${
EXTRA_C_FLAGS
}
/D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS"
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_
EXTRA_C_FLAGS
}
/D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS"
)
# 64-bit portability warnings, in MSVC8
if
(
MSVC80
)
set
(
EXTRA_C_FLAGS
"
${
EXTRA_C_FLAGS
}
/Wp64"
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_
EXTRA_C_FLAGS
}
/Wp64"
)
endif
()
#if(MSVC90)
# set(
EXTRA_C_FLAGS "${
EXTRA_C_FLAGS} /D _BIND_TO_CURRENT_CRT_VERSION=1 /D _BIND_TO_CURRENT_VCLIBS_VERSION=1")
# set(
OPENCV_EXTRA_C_FLAGS "${OPENCV_
EXTRA_C_FLAGS} /D _BIND_TO_CURRENT_CRT_VERSION=1 /D _BIND_TO_CURRENT_VCLIBS_VERSION=1")
#endif()
if
(
BUILD_WITH_DEBUG_INFO
)
set
(
EXTRA_EXE_LINKER_FLAGS_RELEASE
"
${
EXTRA_EXE_LINKER_FLAGS_RELEASE
}
/debug"
)
set
(
OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE
"
${
OPENCV_
EXTRA_EXE_LINKER_FLAGS_RELEASE
}
/debug"
)
endif
()
# Remove unreferenced functions: function level linking
set
(
EXTRA_C_FLAGS
"
${
EXTRA_C_FLAGS
}
/Gy"
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_
EXTRA_C_FLAGS
}
/Gy"
)
if
(
BUILD_WITH_DEBUG_INFO
)
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
/Zi"
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
"
${
OPENCV_
EXTRA_C_FLAGS_RELEASE
}
/Zi"
)
endif
()
endif
()
if
(
CMAKE_COMPILER_IS_GNUCXX
)
# High level of warnings.
set
(
EXTRA_C_FLAGS
"
${
EXTRA_C_FLAGS
}
-Wall"
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_
EXTRA_C_FLAGS
}
-Wall"
)
# The -Wno-long-long is required in 64bit systems when including sytem headers.
if
(
X86_64
)
set
(
EXTRA_C_FLAGS
"
${
EXTRA_C_FLAGS
}
-Wno-long-long"
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_
EXTRA_C_FLAGS
}
-Wno-long-long"
)
endif
()
# We need pthread's
if
(
UNIX AND NOT ANDROID
)
set
(
EXTRA_C_FLAGS
"
${
EXTRA_C_FLAGS
}
-pthread"
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_
EXTRA_C_FLAGS
}
-pthread"
)
endif
()
if
(
OPENCV_WARNINGS_ARE_ERRORS
)
set
(
EXTRA_C_FLAGS
"
${
EXTRA_C_FLAGS
}
-Werror"
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_
EXTRA_C_FLAGS
}
-Werror"
)
endif
()
if
(
X86 AND NOT MINGW64 AND NOT X86_64 AND NOT APPLE
)
set
(
EXTRA_C_FLAGS
"
${
EXTRA_C_FLAGS
}
-march=i686"
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_
EXTRA_C_FLAGS
}
-march=i686"
)
endif
()
# Other optimizations
if
(
ENABLE_OMIT_FRAME_POINTER
)
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
-fomit-frame-pointer"
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
"
${
OPENCV_
EXTRA_C_FLAGS_RELEASE
}
-fomit-frame-pointer"
)
else
()
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
-fno-omit-frame-pointer"
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
"
${
OPENCV_
EXTRA_C_FLAGS_RELEASE
}
-fno-omit-frame-pointer"
)
endif
()
if
(
ENABLE_FAST_MATH
)
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
-ffast-math"
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
"
${
OPENCV_
EXTRA_C_FLAGS_RELEASE
}
-ffast-math"
)
endif
()
if
(
ENABLE_POWERPC
)
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
-mcpu=G3 -mtune=G5"
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
"
${
OPENCV_
EXTRA_C_FLAGS_RELEASE
}
-mcpu=G3 -mtune=G5"
)
endif
()
if
(
ENABLE_SSE
)
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
-msse"
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
"
${
OPENCV_
EXTRA_C_FLAGS_RELEASE
}
-msse"
)
endif
()
if
(
ENABLE_SSE2
)
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
-msse2"
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
"
${
OPENCV_
EXTRA_C_FLAGS_RELEASE
}
-msse2"
)
endif
()
# SSE3 and further should be disabled under MingW because it generates compiler errors
if
(
NOT MINGW
)
if
(
ENABLE_SSE3
)
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
-msse3"
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
"
${
OPENCV_
EXTRA_C_FLAGS_RELEASE
}
-msse3"
)
endif
()
if
(
${
CMAKE_OPENCV_GCC_VERSION_NUM
}
GREATER 402
)
...
...
@@ -1148,14 +1148,14 @@ if(CMAKE_COMPILER_IS_GNUCXX)
if
(
HAVE_GCC42_OR_NEWER OR APPLE
)
if
(
ENABLE_SSSE3
)
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
-mssse3"
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
"
${
OPENCV_
EXTRA_C_FLAGS_RELEASE
}
-mssse3"
)
endif
()
if
(
HAVE_GCC43_OR_NEWER
)
if
(
ENABLE_SSE41
)
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
-msse4.1"
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
"
${
OPENCV_
EXTRA_C_FLAGS_RELEASE
}
-msse4.1"
)
endif
()
if
(
ENABLE_SSE42
)
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
-msse4.2"
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
"
${
OPENCV_
EXTRA_C_FLAGS_RELEASE
}
-msse4.2"
)
endif
()
endif
()
endif
()
...
...
@@ -1163,22 +1163,22 @@ if(CMAKE_COMPILER_IS_GNUCXX)
if
(
X86 OR X86_64
)
if
(
NOT APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 4
)
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
-mfpmath=387"
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
"
${
OPENCV_
EXTRA_C_FLAGS_RELEASE
}
-mfpmath=387"
)
endif
()
endif
()
# Profiling?
if
(
ENABLE_PROFILING
)
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
-pg -g"
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
"
${
OPENCV_
EXTRA_C_FLAGS_RELEASE
}
-pg -g"
)
elseif
(
NOT APPLE
)
# Remove unreferenced functions: function level linking
set
(
EXTRA_C_FLAGS
"
${
EXTRA_C_FLAGS
}
-ffunction-sections"
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_
EXTRA_C_FLAGS
}
-ffunction-sections"
)
endif
()
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
-DNDEBUG"
)
set
(
EXTRA_C_FLAGS_DEBUG
"
${
EXTRA_C_FLAGS_DEBUG
}
-O0 -DDEBUG -D_DEBUG"
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
"
${
OPENCV_
EXTRA_C_FLAGS_RELEASE
}
-DNDEBUG"
)
set
(
OPENCV_EXTRA_C_FLAGS_DEBUG
"
${
OPENCV_
EXTRA_C_FLAGS_DEBUG
}
-O0 -DDEBUG -D_DEBUG"
)
if
(
BUILD_WITH_DEBUG_INFO
)
set
(
EXTRA_C_FLAGS_DEBUG
"
${
EXTRA_C_FLAGS_DEBUG
}
-ggdb3"
)
set
(
OPENCV_EXTRA_C_FLAGS_DEBUG
"
${
OPENCV_
EXTRA_C_FLAGS_DEBUG
}
-ggdb3"
)
endif
()
endif
()
...
...
@@ -1186,20 +1186,20 @@ if(MSVC)
# 64-bit MSVC compiler uses SSE/SSE2 by default
if
(
NOT MSVC64
)
if
(
ENABLE_SSE
)
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
/arch:SSE"
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
"
${
OPENCV_
EXTRA_C_FLAGS_RELEASE
}
/arch:SSE"
)
endif
()
if
(
ENABLE_SSE2
)
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
/arch:SSE2"
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
"
${
OPENCV_
EXTRA_C_FLAGS_RELEASE
}
/arch:SSE2"
)
endif
()
endif
()
if
(
ENABLE_SSE3
)
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
/arch:SSE3"
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
"
${
OPENCV_
EXTRA_C_FLAGS_RELEASE
}
/arch:SSE3"
)
endif
()
if
(
ENABLE_SSE4_1
)
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
/arch:SSE4.1"
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
"
${
OPENCV_
EXTRA_C_FLAGS_RELEASE
}
/arch:SSE4.1"
)
endif
()
if
(
ENABLE_SSE OR ENABLE_SSE2 OR ENABLE_SSE3 OR ENABLE_SSE4_1
)
set
(
EXTRA_C_FLAGS_RELEASE
"
${
EXTRA_C_FLAGS_RELEASE
}
/Oi"
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
"
${
OPENCV_
EXTRA_C_FLAGS_RELEASE
}
/Oi"
)
endif
()
endif
()
...
...
@@ -1212,23 +1212,23 @@ endif()
# Add user supplied extra options (optimization, etc...)
# ==========================================================
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
"
CACHE
STRING
"Extra compiler options"
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
"
${
OPENCV_EXTRA_C_FLAGS_RELEASE
}
"
CACHE
STRING
"Extra compiler options for Release build"
)
set
(
OPENCV_EXTRA_C_FLAGS_DEBUG
"
${
OPENCV_EXTRA_C_FLAGS_DEBUG
}
"
CACHE
STRING
"Extra compiler options for Debug build"
)
set
(
OPENCV_EXTRA_EXE_LINKER_FLAGS
"
${
OPENCV_EXTRA_EXE_LINKER_FLAGS
}
"
CACHE
STRING
"Extra linker flags"
FORCE
)
set
(
OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE
"
${
OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE
}
"
CACHE
STRING
"Extra linker flags for Release build"
FORCE
)
set
(
OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG
"
${
OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG
}
"
CACHE
STRING
"Extra linker flags for Debug build"
FORCE
)
set
(
OPENCV_EXTRA_C_FLAGS
"
${
OPENCV_EXTRA_C_FLAGS
}
"
CACHE
INTERNAL
"Extra compiler options"
)
set
(
OPENCV_EXTRA_C_FLAGS_RELEASE
"
${
OPENCV_EXTRA_C_FLAGS_RELEASE
}
"
CACHE
INTERNAL
"Extra compiler options for Release build"
)
set
(
OPENCV_EXTRA_C_FLAGS_DEBUG
"
${
OPENCV_EXTRA_C_FLAGS_DEBUG
}
"
CACHE
INTERNAL
"Extra compiler options for Debug build"
)
set
(
OPENCV_EXTRA_EXE_LINKER_FLAGS
"
${
OPENCV_EXTRA_EXE_LINKER_FLAGS
}
"
CACHE
INTERNAL
"Extra linker flags"
)
set
(
OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE
"
${
OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE
}
"
CACHE
INTERNAL
"Extra linker flags for Release build"
)
set
(
OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG
"
${
OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG
}
"
CACHE
INTERNAL
"Extra linker flags for Debug build"
)
#combine all "extra" options
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
EXTRA_C_FLAGS
}
${
OPENCV_EXTRA_C_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
EXTRA_C_FLAGS
}
${
OPENCV_EXTRA_C_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"
${
CMAKE_CXX_FLAGS_RELEASE
}
${
EXTRA_C_FLAGS_RELEASE
}
${
OPENCV_EXTRA_C_FLAGS_RELEASE
}
"
)
set
(
CMAKE_C_FLAGS_RELEASE
"
${
CMAKE_C_FLAGS_RELEASE
}
${
EXTRA_C_FLAGS_RELEASE
}
${
OPENCV_EXTRA_C_FLAGS_RELEASE
}
"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"
${
CMAKE_CXX_FLAGS_DEBUG
}
${
EXTRA_C_FLAGS_DEBUG
}
${
OPENCV_EXTRA_C_FLAGS_DEBUG
}
"
)
set
(
CMAKE_C_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS_DEBUG
}
${
EXTRA_C_FLAGS_DEBUG
}
${
OPENCV_EXTRA_C_FLAGS_DEBUG
}
"
)
set
(
CMAKE_EXE_LINKER_FLAGS
"
${
CMAKE_EXE_LINKER_FLAGS
}
${
EXTRA_EXE_LINKER_FLAGS
}
${
OPENCV_EXTRA_EXE_LINKER_FLAGS
}
"
)
set
(
CMAKE_EXE_LINKER_FLAGS_RELEASE
"
${
CMAKE_EXE_LINKER_FLAGS_RELEASE
}
${
EXTRA_EXE_LINKER_FLAGS_RELEASE
}
${
OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE
}
"
)
set
(
CMAKE_EXE_LINKER_FLAGS_DEBUG
"
${
CMAKE_EXE_LINKER_FLAGS_DEBUG
}
${
EXTRA_EXE_LINKER_FLAGS_DEBUG
}
${
OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG
}
"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
OPENCV_EXTRA_C_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
OPENCV_EXTRA_C_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"
${
CMAKE_CXX_FLAGS_RELEASE
}
${
OPENCV_EXTRA_C_FLAGS_RELEASE
}
"
)
set
(
CMAKE_C_FLAGS_RELEASE
"
${
CMAKE_C_FLAGS_RELEASE
}
${
OPENCV_EXTRA_C_FLAGS_RELEASE
}
"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"
${
CMAKE_CXX_FLAGS_DEBUG
}
${
OPENCV_EXTRA_C_FLAGS_DEBUG
}
"
)
set
(
CMAKE_C_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS_DEBUG
}
${
OPENCV_EXTRA_C_FLAGS_DEBUG
}
"
)
set
(
CMAKE_EXE_LINKER_FLAGS
"
${
CMAKE_EXE_LINKER_FLAGS
}
${
OPENCV_EXTRA_EXE_LINKER_FLAGS
}
"
)
set
(
CMAKE_EXE_LINKER_FLAGS_RELEASE
"
${
CMAKE_EXE_LINKER_FLAGS_RELEASE
}
${
OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE
}
"
)
set
(
CMAKE_EXE_LINKER_FLAGS_DEBUG
"
${
CMAKE_EXE_LINKER_FLAGS_DEBUG
}
${
OPENCV_EXTRA_EXE_LINKER_FLAGS_DEBUG
}
"
)
# In case of Makefiles if the user does not setup CMAKE_BUILD_TYPE, assume it's Release:
if
(
CMAKE_GENERATOR MATCHES
".*Makefiles"
AND
"
${
CMAKE_BUILD_TYPE
}
"
STREQUAL
""
)
...
...
modules/ts/misc/run.py
浏览文件 @
6f99447f
...
...
@@ -50,26 +50,29 @@ SIMD_DETECTION_PROGRAM="""
"""
parse_patterns
=
(
{
'name'
:
"has_perf_tests"
,
'default'
:
"OFF"
,
'pattern'
:
re
.
compile
(
"^BUILD_PERF_TESTS:BOOL=(ON)$"
)},
{
'name'
:
"cmake_home"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^CMAKE_HOME_DIRECTORY:INTERNAL=(.+)$"
)},
{
'name'
:
"opencv_home"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^OpenCV_SOURCE_DIR:STATIC=(.+)$"
)},
{
'name'
:
"tests_dir"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^EXECUTABLE_OUTPUT_PATH:PATH=(.+)$"
)},
{
'name'
:
"build_type"
,
'default'
:
"Release"
,
'pattern'
:
re
.
compile
(
"^CMAKE_BUILD_TYPE:STRING=(.*)$"
)},
{
'name'
:
"svnversion_path"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^SVNVERSION_PATH:FILEPATH=(.*)$"
)},
{
'name'
:
"cxx_flags"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^CMAKE_CXX_FLAGS:STRING=(.*)$"
)},
{
'name'
:
"cxx_flags_debug"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^CMAKE_CXX_FLAGS_DEBUG:STRING=(.*)$"
)},
{
'name'
:
"cxx_flags_release"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^CMAKE_CXX_FLAGS_RELEASE:STRING=(.*)$"
)},
{
'name'
:
"cxx_flags_android"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^ANDROID_CXX_FLAGS:INTERNAL=(.*)$"
)},
{
'name'
:
"cxx_compiler_path"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^CMAKE_CXX_COMPILER:FILEPATH=(.*)$"
)},
{
'name'
:
"ndk_path"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^(?:ANDROID_NDK|ANDROID_STANDALONE_TOOLCHAIN)?:PATH=(.*)$"
)},
{
'name'
:
"android_abi"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^ANDROID_ABI:STRING=(.*)$"
)},
{
'name'
:
"android_executable"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^ANDROID_EXECUTABLE:FILEPATH=(.*android.*)$"
)},
{
'name'
:
"is_x64"
,
'default'
:
"OFF"
,
'pattern'
:
re
.
compile
(
"^CUDA_64_BIT_DEVICE_CODE:BOOL=(ON)$"
)},
#ugly(
{
'name'
:
"cmake_generator"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^CMAKE_GENERATOR:INTERNAL=(.+)$"
)},
{
'name'
:
"cxx_compiler"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^CMAKE_CXX_COMPILER:FILEPATH=(.+)$"
)},
{
'name'
:
"with_cuda"
,
'default'
:
"OFF"
,
'pattern'
:
re
.
compile
(
"^WITH_CUDA:BOOL=(ON)$"
)},
{
'name'
:
"cuda_library"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^CUDA_CUDA_LIBRARY:FILEPATH=(.+)$"
)},
{
'name'
:
"core_dependencies"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^opencv_core_LIB_DEPENDS:STATIC=(.+)$"
)},
{
'name'
:
"has_perf_tests"
,
'default'
:
"OFF"
,
'pattern'
:
re
.
compile
(
"^BUILD_PERF_TESTS:BOOL=(ON)$"
)},
{
'name'
:
"cmake_home"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^CMAKE_HOME_DIRECTORY:INTERNAL=(.+)$"
)},
{
'name'
:
"opencv_home"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^OpenCV_SOURCE_DIR:STATIC=(.+)$"
)},
{
'name'
:
"tests_dir"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^EXECUTABLE_OUTPUT_PATH:PATH=(.+)$"
)},
{
'name'
:
"build_type"
,
'default'
:
"Release"
,
'pattern'
:
re
.
compile
(
"^CMAKE_BUILD_TYPE:STRING=(.*)$"
)},
{
'name'
:
"svnversion_path"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^SVNVERSION_PATH:FILEPATH=(.*)$"
)},
{
'name'
:
"cxx_flags"
,
'default'
:
""
,
'pattern'
:
re
.
compile
(
"^CMAKE_CXX_FLAGS:STRING=(.*)$"
)},
{
'name'
:
"cxx_flags_debug"
,
'default'
:
""
,
'pattern'
:
re
.
compile
(
"^CMAKE_CXX_FLAGS_DEBUG:STRING=(.*)$"
)},
{
'name'
:
"cxx_flags_release"
,
'default'
:
""
,
'pattern'
:
re
.
compile
(
"^CMAKE_CXX_FLAGS_RELEASE:STRING=(.*)$"
)},
{
'name'
:
"opencv_cxx_flags"
,
'default'
:
""
,
'pattern'
:
re
.
compile
(
"^OPENCV_EXTRA_C_FLAGS:INTERNAL=(.*)$"
)},
{
'name'
:
"opencv_cxx_flags_debug"
,
'default'
:
""
,
'pattern'
:
re
.
compile
(
"^OPENCV_EXTRA_C_FLAGS_DEBUG:INTERNAL=(.*)$"
)},
{
'name'
:
"opencv_cxx_flags_release"
,
'default'
:
""
,
'pattern'
:
re
.
compile
(
"^OPENCV_EXTRA_C_FLAGS_RELEASE:INTERNAL=(.*)$"
)},
{
'name'
:
"cxx_flags_android"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^ANDROID_CXX_FLAGS:INTERNAL=(.*)$"
)},
{
'name'
:
"cxx_compiler_path"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^CMAKE_CXX_COMPILER:FILEPATH=(.*)$"
)},
{
'name'
:
"ndk_path"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^(?:ANDROID_NDK|ANDROID_STANDALONE_TOOLCHAIN)?:PATH=(.*)$"
)},
{
'name'
:
"android_abi"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^ANDROID_ABI:STRING=(.*)$"
)},
{
'name'
:
"android_executable"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^ANDROID_EXECUTABLE:FILEPATH=(.*android.*)$"
)},
{
'name'
:
"is_x64"
,
'default'
:
"OFF"
,
'pattern'
:
re
.
compile
(
"^CUDA_64_BIT_DEVICE_CODE:BOOL=(ON)$"
)},
#ugly(
{
'name'
:
"cmake_generator"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^CMAKE_GENERATOR:INTERNAL=(.+)$"
)},
{
'name'
:
"cxx_compiler"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^CMAKE_CXX_COMPILER:FILEPATH=(.+)$"
)},
{
'name'
:
"with_cuda"
,
'default'
:
"OFF"
,
'pattern'
:
re
.
compile
(
"^WITH_CUDA:BOOL=(ON)$"
)},
{
'name'
:
"cuda_library"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^CUDA_CUDA_LIBRARY:FILEPATH=(.+)$"
)},
{
'name'
:
"core_dependencies"
,
'default'
:
None
,
'pattern'
:
re
.
compile
(
"^opencv_core_LIB_DEPENDS:STATIC=(.+)$"
)},
)
def
query_yes_no
(
stdout
,
question
,
default
=
"yes"
):
...
...
@@ -447,7 +450,7 @@ class RunInfo(object):
fd
.
write
(
SIMD_DETECTION_PROGRAM
)
fd
.
close
();
options
=
[
self
.
cxx_compiler_path
]
cxx_flags
=
self
.
cxx_flags
+
" "
+
self
.
cxx_flags_release
cxx_flags
=
self
.
cxx_flags
+
" "
+
self
.
cxx_flags_release
+
" "
+
self
.
opencv_cxx_flags
+
" "
+
self
.
opencv_cxx_flags_release
if
self
.
targetos
==
"android"
:
cxx_flags
=
self
.
cxx_flags_android
+
" "
+
cxx_flags
...
...
@@ -464,6 +467,7 @@ class RunInfo(object):
else
:
prev_option
=
prev_option
+
" "
+
opt
options
.
append
(
tmpfile
[
1
])
print
options
output
=
Popen
(
options
,
stdout
=
PIPE
,
stderr
=
PIPE
).
communicate
()
compiler_output
=
output
[
1
]
os
.
remove
(
tmpfile
[
1
])
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录