[hamradio-commits] [gnss-sdr] 162/303: Fix detection of pthread in some environments
Carles Fernandez
carles_fernandez-guest at moszumanska.debian.org
Mon Feb 13 22:35:57 UTC 2017
This is an automated email from the git hooks/post-receive script.
carles_fernandez-guest pushed a commit to branch master
in repository gnss-sdr.
commit c9ba5e8441c686f4429932d39ef784025a012d67
Author: Carles Fernandez <carlesfernandez at gmail.com>
Date: Thu Nov 24 19:49:35 2016 +0100
Fix detection of pthread in some environments
---
CMakeLists.txt | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bdd123f..a7373ac 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -554,11 +554,11 @@ if (NOT GLOG_FOUND OR ${LOCAL_GFLAGS})
if(${LOCAL_GFLAGS})
set(GFLAGS_LIBRARIES_TO_LINK ${GFlags_SHARED_LIBS})
set(GFLAGS_LIBRARY_DIR_TO_LINK ${CMAKE_CURRENT_BINARY_DIR}/gflags-${gflags_RELEASE}/lib)
- else(${LOCAL_GFLAGS})
+ else(${LOCAL_GFLAGS})
set(GFLAGS_LIBRARIES_TO_LINK ${GFlags_LIBS})
set(GFLAGS_LIBRARY_DIR_TO_LINK ${GFlags_LIBRARY_DIRS})
endif(${LOCAL_GFLAGS})
-
+
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/glog-${glog_RELEASE}/tmp/configure_with_gflags
"#!/bin/sh
@@ -839,6 +839,10 @@ if(NOT GNUTLS_OPENSSL_LIBRARY)
endif(OPENSSL_FOUND)
endif(NOT GNUTLS_OPENSSL_LIBRARY)
+if(OS_IS_LINUX)
+ find_package(Threads REQUIRED)
+ link_libraries(${CMAKE_THREAD_LIBS_INIT})
+endif(OS_IS_LINUX)
################################################################################
# USRP Hardware Driver (UHD) - OPTIONAL
@@ -1122,15 +1126,8 @@ if(ENABLE_GPROF)
#endif(CMAKE_COMPILER_IS_GNUCXX)
endif(ENABLE_GPROF)
-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MY_CXX_FLAGS}")
-if(OS_IS_LINUX)
- if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "openSUSE" OR ${LINUX_DISTRIBUTION} MATCHES "ArchLinux")
- link_libraries(pthread)
- endif(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "openSUSE" OR ${LINUX_DISTRIBUTION} MATCHES "ArchLinux")
-endif(OS_IS_LINUX)
-
########################################################################
# Create uninstall target
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git
More information about the pkg-hamradio-commits
mailing list