Merge lp:~dobey/pay-service/more-cgo-flags-gccgo into lp:pay-service/15.04

Proposed by dobey
Status: Merged
Approved by: Antti Kaijanmäki
Approved revision: 178
Merged at revision: 52
Proposed branch: lp:~dobey/pay-service/more-cgo-flags-gccgo
Merge into: lp:pay-service/15.04
Prerequisite: lp:~charlesk/pay-service/downgrade-g-warnings
Diff against target: 35 lines (+13/-2)
2 files modified
service-ng/CMakeLists.txt (+12/-1)
service-ng/test-service.sh (+1/-1)
To merge this branch: bzr merge lp:~dobey/pay-service/more-cgo-flags-gccgo
Reviewer Review Type Date Requested Status
Antti Kaijanmäki (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+274620@code.launchpad.net

Commit message

Need the threading lib for gccgo.
Need the path to the g++ lib directory for linking with gccgo.
Need to disable coverage reporting under gccgo.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Antti Kaijanmäki (kaijanmaki) wrote :

LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'service-ng/CMakeLists.txt'
2--- service-ng/CMakeLists.txt 2015-10-15 19:18:50 +0000
3+++ service-ng/CMakeLists.txt 2015-10-15 19:18:50 +0000
4@@ -3,7 +3,18 @@
5 set(SERVICE_NG_TARGET pay-service-2)
6
7 # Set environment for go
8-set(GO_ENV GOPATH=${CMAKE_CURRENT_SOURCE_DIR} CGO_CFLAGS="${SERVICE_DEPS_CFLAGS}" CGO_CXXFLAGS="${SERVICE_DEPS_CFLAGS}" CGO_LDFLAGS="${SERVICE_DEPS_LDFLAGS}")
9+find_package(Threads)
10+execute_process(
11+ COMMAND ${CMAKE_CXX_COMPILER} --print-file-name libstdc++.so
12+ OUTPUT_VARIABLE LIBSTDC_PATH
13+ OUTPUT_STRIP_TRAILING_WHITESPACE
14+)
15+execute_process(
16+ COMMAND dirname ${LIBSTDC_PATH}
17+ OUTPUT_VARIABLE GCC_LIB_DIR
18+ OUTPUT_STRIP_TRAILING_WHITESPACE
19+)
20+set(GO_ENV CXX=${CMAKE_CXX_COMPILER} GOPATH=${CMAKE_CURRENT_SOURCE_DIR} CGO_CFLAGS="${SERVICE_DEPS_CFLAGS}" CGO_CXXFLAGS="${SERVICE_DEPS_CFLAGS}" CGO_LDFLAGS="${SERVICE_DEPS_LDFLAGS};-L${GCC_LIB_DIR};${CMAKE_THREAD_LIBS_INIT}")
21
22 add_custom_target(${SERVICE_NG_TARGET} ALL
23 COMMAND ${GO_ENV} go build ${SERVICE_NG_TARGET}
24
25=== modified file 'service-ng/test-service.sh'
26--- service-ng/test-service.sh 2015-10-15 19:18:50 +0000
27+++ service-ng/test-service.sh 2015-10-15 19:18:50 +0000
28@@ -18,7 +18,7 @@
29 set -e
30
31 GO_TEST_OPTIONS=""
32-if [ "x${2}" = "xcoverage" ]; then
33+if [ "x${2}" = "xcoverage" -a -z "`go version|grep gccgo`" ]; then
34 GO_TEST_OPTIONS="-coverprofile=go.cover"
35 fi
36

Subscribers

People subscribed via source and target branches

to all changes: