You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-db/pgagent/files/pgagent-4.0.0-pthreads-link...

34 lines
806 B

From 5b79460bdda286ca988b39e93e446176e8a781d1 Mon Sep 17 00:00:00 2001
From: Neel Patel <neel.patel@enterprisedb.com>
Date: Fri, 20 Jul 2018 13:35:35 +0100
Subject: [PATCH] Link with pthreads on non-Windows and non-macOS platforms.
Patch based on feedback and initial work by Christoph Berg.
---
CMakeLists.txt | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1be24da..6f1eaa0 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -134,9 +134,15 @@ IF(WIN32)
ENDIF(WIN32)
ADD_EXECUTABLE(pgagent ${_srcs})
+IF(UNIX AND NOT APPLE)
+TARGET_LINK_LIBRARIES(
+ pgagent ${PG_LIBRARIES} ${Boost_LIBRARIES} -pthread
+)
+ELSE()
TARGET_LINK_LIBRARIES(
pgagent ${PG_LIBRARIES} ${Boost_LIBRARIES}
)
+ENDIF()
# Installation
IF (WIN32)
--
2.24.1