Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
dbc6fe3a
Commit
dbc6fe3a
authored
Oct 31, 2018
by
Ivan Pozdeev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detect cross-cutting frameworks before libraries so the latter can use them
parent
cc2f8f17
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
41 deletions
+46
-41
CMakeLists.txt
CMakeLists.txt
+2
-0
OpenCVFindFrameworks.cmake
cmake/OpenCVFindFrameworks.cmake
+44
-0
OpenCVFindLibsPerf.cmake
cmake/OpenCVFindLibsPerf.cmake
+0
-41
No files found.
CMakeLists.txt
View file @
dbc6fe3a
...
...
@@ -634,6 +634,8 @@ if(ANDROID AND WITH_CPUFEATURES)
set
(
HAVE_CPUFEATURES 1
)
endif
()
include
(
cmake/OpenCVFindFrameworks.cmake
)
include
(
cmake/OpenCVFindLibsGrfmt.cmake
)
include
(
cmake/OpenCVFindLibsGUI.cmake
)
include
(
cmake/OpenCVFindLibsVideo.cmake
)
...
...
cmake/OpenCVFindFrameworks.cmake
0 → 100644
View file @
dbc6fe3a
# ----------------------------------------------------------------------------
# Detect frameworks that may be used by 3rd-party libraries as well as OpenCV
# ----------------------------------------------------------------------------
# --- C= ---
if
(
WITH_CSTRIPES AND NOT HAVE_TBB
)
include
(
"
${
OpenCV_SOURCE_DIR
}
/cmake/OpenCVDetectCStripes.cmake"
)
else
()
set
(
HAVE_CSTRIPES 0
)
endif
()
# --- GCD ---
if
(
APPLE AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES
)
set
(
HAVE_GCD 1
)
else
()
set
(
HAVE_GCD 0
)
endif
()
# --- Concurrency ---
if
(
MSVC AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES
)
set
(
_fname
"
${
CMAKE_BINARY_DIR
}${
CMAKE_FILES_DIRECTORY
}
/CMakeTmp/concurrencytest.cpp"
)
file
(
WRITE
"
${
_fname
}
"
"#if _MSC_VER < 1600
\n
#error
\n
#endif
\n
int main() { return 0; }
\n
"
)
try_compile
(
HAVE_CONCURRENCY
"
${
CMAKE_BINARY_DIR
}
"
"
${
_fname
}
"
)
file
(
REMOVE
"
${
_fname
}
"
)
else
()
set
(
HAVE_CONCURRENCY 0
)
endif
()
# --- OpenMP ---
if
(
WITH_OPENMP
)
find_package
(
OpenMP
)
if
(
OPENMP_FOUND
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
OpenMP_C_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
OpenMP_CXX_FLAGS
}
"
)
endif
()
set
(
HAVE_OPENMP
"
${
OPENMP_FOUND
}
"
)
endif
()
ocv_clear_vars
(
HAVE_PTHREADS_PF
)
if
(
WITH_PTHREADS_PF AND HAVE_PTHREAD
)
set
(
HAVE_PTHREADS_PF 1
)
else
()
set
(
HAVE_PTHREADS_PF 0
)
endif
()
cmake/OpenCVFindLibsPerf.cmake
View file @
dbc6fe3a
...
...
@@ -92,44 +92,3 @@ if(WITH_CLP)
endif
()
endif
()
endif
(
WITH_CLP
)
# --- C= ---
if
(
WITH_CSTRIPES AND NOT HAVE_TBB
)
include
(
"
${
OpenCV_SOURCE_DIR
}
/cmake/OpenCVDetectCStripes.cmake"
)
else
()
set
(
HAVE_CSTRIPES 0
)
endif
()
# --- GCD ---
if
(
APPLE AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES
)
set
(
HAVE_GCD 1
)
else
()
set
(
HAVE_GCD 0
)
endif
()
# --- Concurrency ---
if
(
MSVC AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES
)
set
(
_fname
"
${
CMAKE_BINARY_DIR
}${
CMAKE_FILES_DIRECTORY
}
/CMakeTmp/concurrencytest.cpp"
)
file
(
WRITE
"
${
_fname
}
"
"#if _MSC_VER < 1600
\n
#error
\n
#endif
\n
int main() { return 0; }
\n
"
)
try_compile
(
HAVE_CONCURRENCY
"
${
CMAKE_BINARY_DIR
}
"
"
${
_fname
}
"
)
file
(
REMOVE
"
${
_fname
}
"
)
else
()
set
(
HAVE_CONCURRENCY 0
)
endif
()
# --- OpenMP ---
if
(
WITH_OPENMP
)
find_package
(
OpenMP
)
if
(
OPENMP_FOUND
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
OpenMP_C_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
OpenMP_CXX_FLAGS
}
"
)
endif
()
set
(
HAVE_OPENMP
"
${
OPENMP_FOUND
}
"
)
endif
()
ocv_clear_vars
(
HAVE_PTHREADS_PF
)
if
(
WITH_PTHREADS_PF AND HAVE_PTHREAD
)
set
(
HAVE_PTHREADS_PF 1
)
else
()
set
(
HAVE_PTHREADS_PF 0
)
endif
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment