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
d1e7a7e0
Commit
d1e7a7e0
authored
Aug 14, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9364 from alalek:update_pthread
parents
6b2510d3
6ff9fc67
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
18 deletions
+8
-18
CMakeLists.txt
3rdparty/protobuf/CMakeLists.txt
+2
-5
CMakeLists.txt
3rdparty/tbb/CMakeLists.txt
+1
-1
CMakeLists.txt
CMakeLists.txt
+2
-2
OpenCVFindLibsPerf.cmake
cmake/OpenCVFindLibsPerf.cmake
+2
-9
cvconfig.h.in
cmake/templates/cvconfig.h.in
+1
-1
No files found.
3rdparty/protobuf/CMakeLists.txt
View file @
d1e7a7e0
...
...
@@ -2,11 +2,8 @@ project(libprotobuf)
include
(
CheckIncludeFiles
)
if
(
NOT MSVC
)
check_include_files
(
"pthread.h"
HAVE_PTHREAD
)
if
(
HAVE_PTHREAD
)
add_definitions
(
-DHAVE_PTHREAD=1
)
endif
()
if
(
HAVE_PTHREAD
)
add_definitions
(
-DHAVE_PTHREAD=1
)
endif
()
if
(
MSVC
)
...
...
3rdparty/tbb/CMakeLists.txt
View file @
d1e7a7e0
...
...
@@ -67,7 +67,7 @@ else()
)
endif
()
if
(
HAVE_LIB
PTHREAD
)
if
(
HAVE_
PTHREAD
)
add_definitions
(
-DUSE_PTHREAD
)
#required for Unix
endif
()
...
...
CMakeLists.txt
View file @
d1e7a7e0
...
...
@@ -554,7 +554,7 @@ if(UNIX)
include
(
CheckSymbolExists
)
if
(
NOT APPLE
)
CHECK_INCLUDE_FILE
(
pthread.h HAVE_
LIB
PTHREAD
)
CHECK_INCLUDE_FILE
(
pthread.h HAVE_PTHREAD
)
if
(
ANDROID
)
set
(
OPENCV_LINKER_LIBS
${
OPENCV_LINKER_LIBS
}
dl m log
)
elseif
(
${
CMAKE_SYSTEM_NAME
}
MATCHES
"FreeBSD|NetBSD|DragonFly|OpenBSD"
)
...
...
@@ -565,7 +565,7 @@ if(UNIX)
set
(
OPENCV_LINKER_LIBS
${
OPENCV_LINKER_LIBS
}
dl m pthread rt
)
endif
()
else
()
set
(
HAVE_
LIBPTHREAD YES
)
set
(
HAVE_
PTHREAD 1
)
endif
()
CHECK_SYMBOL_EXISTS
(
posix_memalign stdlib.h HAVE_POSIX_MEMALIGN
)
...
...
cmake/OpenCVFindLibsPerf.cmake
View file @
d1e7a7e0
...
...
@@ -125,16 +125,9 @@ if(WITH_OPENMP)
set
(
HAVE_OPENMP
"
${
OPENMP_FOUND
}
"
)
endif
()
if
(
NOT MSVC AND NOT DEFINED HAVE_PTHREADS
)
set
(
_fname
"
${
CMAKE_BINARY_DIR
}${
CMAKE_FILES_DIRECTORY
}
/CMakeTmp/pthread_test.cpp"
)
file
(
WRITE
"
${
_fname
}
"
"#include <pthread.h>
\n
int main() { (void)pthread_self(); return 0; }
\n
"
)
try_compile
(
HAVE_PTHREADS
"
${
CMAKE_BINARY_DIR
}
"
"
${
_fname
}
"
)
file
(
REMOVE
"
${
_fname
}
"
)
endif
()
ocv_clear_vars
(
HAVE_PTHREADS_PF
)
if
(
WITH_PTHREADS_PF
)
set
(
HAVE_PTHREADS_PF
${
HAVE_PTHREADS
}
)
if
(
WITH_PTHREADS_PF
AND HAVE_PTHREAD
)
set
(
HAVE_PTHREADS_PF
1
)
else
()
set
(
HAVE_PTHREADS_PF 0
)
endif
()
cmake/templates/cvconfig.h.in
View file @
d1e7a7e0
...
...
@@ -154,7 +154,7 @@
#cmakedefine HAVE_PNG
/* Posix threads (pthreads) */
#cmakedefine HAVE_PTHREAD
S
#cmakedefine HAVE_PTHREAD
/* parallel_for with pthreads */
#cmakedefine HAVE_PTHREADS_PF
...
...
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