Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
glog
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
yocto-mirrors
github
google
glog
Commits
fe46778b
Unverified
Commit
fe46778b
authored
1 year ago
by
Sergiu Deitsch
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: threads are always enabled (#1036)
parent
6d23649f
Branches
fix3764
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+6
-23
6 additions, 23 deletions
CMakeLists.txt
glog-config.cmake.in
+2
-1
2 additions, 1 deletion
glog-config.cmake.in
src/config.h.cmake.in
+0
-3
0 additions, 3 deletions
src/config.h.cmake.in
with
8 additions
and
27 deletions
CMakeLists.txt
+
6
−
23
View file @
fe46778b
...
@@ -39,13 +39,12 @@ option (WITH_GFLAGS "Use gflags" ON)
...
@@ -39,13 +39,12 @@ option (WITH_GFLAGS "Use gflags" ON)
option
(
WITH_GTEST
"Use Google Test"
ON
)
option
(
WITH_GTEST
"Use Google Test"
ON
)
option
(
WITH_PKGCONFIG
"Enable pkg-config support"
OFF
)
option
(
WITH_PKGCONFIG
"Enable pkg-config support"
OFF
)
option
(
WITH_SYMBOLIZE
"Enable symbolize module"
ON
)
option
(
WITH_SYMBOLIZE
"Enable symbolize module"
ON
)
option
(
WITH_T
HREAD
S
"Enable
multithreading
support"
ON
)
option
(
WITH_T
L
S
"Enable
Thread Local Storage (TLS)
support"
ON
)
set
(
WITH_UNWIND libunwind CACHE STRING
"unwind driver"
)
set
(
WITH_UNWIND libunwind CACHE STRING
"unwind driver"
)
set_property
(
CACHE WITH_UNWIND PROPERTY STRINGS none unwind libunwind
)
set_property
(
CACHE WITH_UNWIND PROPERTY STRINGS none unwind libunwind
)
cmake_dependent_option
(
WITH_GMOCK
"Use Google Mock"
ON WITH_GTEST OFF
)
cmake_dependent_option
(
WITH_GMOCK
"Use Google Mock"
ON WITH_GTEST OFF
)
cmake_dependent_option
(
WITH_TLS
"Enable Thread Local Storage (TLS) support"
ON WITH_THREADS OFF
)
set
(
WITH_FUZZING none CACHE STRING
"Fuzzing engine"
)
set
(
WITH_FUZZING none CACHE STRING
"Fuzzing engine"
)
set_property
(
CACHE WITH_FUZZING PROPERTY STRINGS none libfuzzer ossfuzz
)
set_property
(
CACHE WITH_FUZZING PROPERTY STRINGS none libfuzzer ossfuzz
)
...
@@ -58,10 +57,6 @@ if (NOT WITH_GTEST)
...
@@ -58,10 +57,6 @@ if (NOT WITH_GTEST)
set
(
CMAKE_DISABLE_FIND_PACKAGE_GTest ON
)
set
(
CMAKE_DISABLE_FIND_PACKAGE_GTest ON
)
endif
(
NOT WITH_GTEST
)
endif
(
NOT WITH_GTEST
)
if
(
NOT WITH_THREADS
)
set
(
CMAKE_DISABLE_FIND_PACKAGE_Threads ON
)
endif
(
NOT WITH_THREADS
)
set
(
CMAKE_C_VISIBILITY_PRESET hidden
)
set
(
CMAKE_C_VISIBILITY_PRESET hidden
)
set
(
CMAKE_CXX_VISIBILITY_PRESET hidden
)
set
(
CMAKE_CXX_VISIBILITY_PRESET hidden
)
set
(
CMAKE_POSITION_INDEPENDENT_CODE ON
)
set
(
CMAKE_POSITION_INDEPENDENT_CODE ON
)
...
@@ -88,7 +83,7 @@ if (WITH_GFLAGS)
...
@@ -88,7 +83,7 @@ if (WITH_GFLAGS)
endif
(
gflags_FOUND
)
endif
(
gflags_FOUND
)
endif
(
WITH_GFLAGS
)
endif
(
WITH_GFLAGS
)
find_package
(
Threads
)
find_package
(
Threads
REQUIRED
)
find_package
(
Unwind
)
find_package
(
Unwind
)
if
(
Unwind_FOUND
)
if
(
Unwind_FOUND
)
...
@@ -288,14 +283,6 @@ check_cxx_symbol_exists (localtime_r "cstdlib;ctime" HAVE_LOCALTIME_R)
...
@@ -288,14 +283,6 @@ check_cxx_symbol_exists (localtime_r "cstdlib;ctime" HAVE_LOCALTIME_R)
set
(
SIZEOF_VOID_P
${
CMAKE_SIZEOF_VOID_P
}
)
set
(
SIZEOF_VOID_P
${
CMAKE_SIZEOF_VOID_P
}
)
if
(
WITH_THREADS AND Threads_FOUND
)
if
(
CMAKE_USE_PTHREADS_INIT
)
set
(
HAVE_PTHREAD 1
)
endif
(
CMAKE_USE_PTHREADS_INIT
)
else
(
WITH_THREADS AND Threads_FOUND
)
set
(
NO_THREADS 1
)
endif
(
WITH_THREADS AND Threads_FOUND
)
# fopen/open on Cygwin can not handle unix-type paths like /home/....
# fopen/open on Cygwin can not handle unix-type paths like /home/....
# therefore we translate TEST_SRC_DIR to windows-path.
# therefore we translate TEST_SRC_DIR to windows-path.
if
(
CYGWIN
)
if
(
CYGWIN
)
...
@@ -434,15 +421,11 @@ if (HAVE_DBGHELP)
...
@@ -434,15 +421,11 @@ if (HAVE_DBGHELP)
set
(
glog_libraries_options_for_static_linking
"
${
glog_libraries_options_for_static_linking
}
-ldbghelp"
)
set
(
glog_libraries_options_for_static_linking
"
${
glog_libraries_options_for_static_linking
}
-ldbghelp"
)
endif
(
HAVE_DBGHELP
)
endif
(
HAVE_DBGHELP
)
if
(
HAVE_PTHREAD
)
target_link_libraries
(
glog PRIVATE Threads::Threads
)
target_link_libraries
(
glog PRIVATE Threads::Threads
)
set
(
Threads_DEPENDENCY
"find_dependency (Threads)"
)
if
(
CMAKE_THREAD_LIBS_INIT
)
if
(
CMAKE_THREAD_LIBS_INIT
)
set
(
glog_libraries_options_for_static_linking
"
${
glog_libraries_options_for_static_linking
}
${
CMAKE_THREAD_LIBS_INIT
}
"
)
set
(
glog_libraries_options_for_static_linking
"
${
glog_libraries_options_for_static_linking
}
${
CMAKE_THREAD_LIBS_INIT
}
"
)
endif
(
CMAKE_THREAD_LIBS_INIT
)
endif
(
CMAKE_THREAD_LIBS_INIT
)
endif
(
HAVE_PTHREAD
)
if
(
gflags_FOUND
)
if
(
gflags_FOUND
)
# Prefer the gflags target that uses double colon convention
# Prefer the gflags target that uses double colon convention
...
...
This diff is collapsed.
Click to expand it.
glog-config.cmake.in
+
2
−
1
View file @
fe46778b
...
@@ -7,8 +7,9 @@ endif (CMAKE_VERSION VERSION_LESS @glog_CMake_VERSION@)
...
@@ -7,8 +7,9 @@ endif (CMAKE_VERSION VERSION_LESS @glog_CMake_VERSION@)
include (CMakeFindDependencyMacro)
include (CMakeFindDependencyMacro)
include (${CMAKE_CURRENT_LIST_DIR}/glog-modules.cmake)
include (${CMAKE_CURRENT_LIST_DIR}/glog-modules.cmake)
find_dependency (Threads)
@gflags_DEPENDENCY@
@gflags_DEPENDENCY@
@Threads_DEPENDENCY@
@Unwind_DEPENDENCY@
@Unwind_DEPENDENCY@
include (${CMAKE_CURRENT_LIST_DIR}/glog-targets.cmake)
include (${CMAKE_CURRENT_LIST_DIR}/glog-targets.cmake)
This diff is collapsed.
Click to expand it.
src/config.h.cmake.in
+
0
−
3
View file @
fe46778b
...
@@ -28,9 +28,6 @@
...
@@ -28,9 +28,6 @@
/* define if you have dbghelp library */
/* define if you have dbghelp library */
#cmakedefine HAVE_DBGHELP
#cmakedefine HAVE_DBGHELP
/* define to disable multithreading support. */
#cmakedefine NO_THREADS
/* Define if you have the 'pread' function */
/* Define if you have the 'pread' function */
#cmakedefine HAVE_PREAD
#cmakedefine HAVE_PREAD
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment