Merge lp:~dobey/unity-scope-click/explicit-pthread into lp:unity-scope-click

Proposed by dobey
Status: Merged
Approved by: Alejandro J. Cura
Approved revision: 266
Merged at revision: 265
Proposed branch: lp:~dobey/unity-scope-click/explicit-pthread
Merge into: lp:unity-scope-click
Diff against target: 22 lines (+4/-2)
1 file modified
tools/init-departments/CMakeLists.txt (+4/-2)
To merge this branch: bzr merge lp:~dobey/unity-scope-click/explicit-pthread
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Alejandro J. Cura (community) Approve
Review via email: mp+230973@code.launchpad.net

Commit message

New libstdc++ requires explicit -lpthread when using std::thread.

To post a comment you must log in.
266. By dobey

Use the cmake thread libs variable instead.

Revision history for this message
Alejandro J. Cura (alecu) wrote :

Code looks good, have not tested it.

review: Approve
267. By dobey

Also need the find_package(Threads) in the init-departments CMakeLists.txt.

Revision history for this message
Adam Conrad (adconrad) wrote :

Tested r267, and it does the right thing.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tools/init-departments/CMakeLists.txt'
2--- tools/init-departments/CMakeLists.txt 2014-07-14 09:43:27 +0000
3+++ tools/init-departments/CMakeLists.txt 2014-08-15 14:03:54 +0000
4@@ -2,6 +2,7 @@
5 set (INITDEPTS init-departments)
6
7 find_package (Qt5Core REQUIRED)
8+find_package (Threads)
9
10 include_directories (
11 ${CMAKE_SOURCE_DIR}/libclickscope
12@@ -15,7 +16,8 @@
13 qt5_use_modules (${INITDEPTS} Network Sql)
14
15 target_link_libraries(${INITDEPTS}
16- ${SCOPE_LIB_NAME}
17- )
18+ ${SCOPE_LIB_NAME}
19+ ${CMAKE_THREAD_LIBS_INIT}
20+)
21
22 install(TARGETS ${INITDEPTS} DESTINATION sbin)

Subscribers

People subscribed via source and target branches

to all changes: