Merge lp:~gcollura/phablet-tools/click-buddy into lp:phablet-tools

Proposed by Giulio Collura
Status: Needs review
Proposed branch: lp:~gcollura/phablet-tools/click-buddy
Merge into: lp:phablet-tools
Diff against target: 70 lines (+14/-8)
1 file modified
click-buddy (+14/-8)
To merge this branch: bzr merge lp:~gcollura/phablet-tools/click-buddy
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+236950@code.launchpad.net

Commit message

Update click-buddy to build projects in a temporary directory.
Add extra cmake parameters option.

Description of the change

Make click-buddy compile the app in a temporary directory, to avoid:
1 - cluttering the source directory
2 - having to clean the source directory every time a new build is requested.
In particular the latter due to a CMake Error:

CMake Error at /usr/lib/arm-linux-gnueabihf/cmake/Qt5Core/Qt5CoreConfig.cmake:27 (message):
 The imported target "Qt5::Core" references the file
     "/usr/lib/arm-linux-gnueabihf/qt5/bin/moc"
 but this file does not exist. Possible reasons include:
 * The file was deleted, renamed, or moved to another location.
 * An install or uninstall procedure did not complete successfully.
 * The installation package was faulty and contained
    "/usr/lib/arm-linux-gnueabihf/cmake/Qt5Core/Qt5CoreConfigExtras.cmake"
 but not all the files it references.

To post a comment you must log in.
330. By Giulio Collura

Add extra cmake parameters option

Unmerged revisions

330. By Giulio Collura

Add extra cmake parameters option

329. By Giulio Collura

Make cmake build in a temporary directory to avoid cluttering the source dir.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'click-buddy'
2--- click-buddy 2014-09-09 14:46:55 +0000
3+++ click-buddy 2014-10-15 18:35:05 +0000
4@@ -37,6 +37,7 @@
5 (defaults to arch all)
6 --framework Target click framework, requires a created click chroot
7 (defaults to ubuntu-sdk-13.10)
8+ --extra-params Set extra cmake parameters
9 EOF
10 }
11
12@@ -49,11 +50,12 @@
13 ARCH="all"
14 FRAMEWORK="ubuntu-sdk-13.10"
15 MAINTMODE=""
16+CMAKE_PARAMS=""
17
18 TEST_DIR='tests/autopilot'
19 DEVICE_USER='phablet'
20
21-ARGS=$(getopt -o s:h -l "maint-mode,extra-deps:,bzr-source:,provision,no-clean,framework:,dir:,arch:,help" -n "$0" -- "$@")
22+ARGS=$(getopt -o s:h -l "maint-mode,extra-deps:,bzr-source:,provision,no-clean,framework:,extra-params:,dir:,arch:,help" -n "$0" -- "$@")
23
24 if [ $? -ne 0 ] ; then
25 exit 1
26@@ -108,10 +110,15 @@
27 shift
28 MAINTMODE=1
29 ;;
30- --)
31- shift
32- break
33- ;;
34+ --extra-params)
35+ shift
36+ CMAKE_PARAMS="$@"
37+ shift
38+ ;;
39+ --)
40+ shift
41+ break
42+ ;;
43 esac
44 done
45
46@@ -135,7 +142,7 @@
47 cd $builddir
48
49 CMAKE_PARAMS="-DINSTALL_TESTS=off -DCLICK_MODE=on \
50- -DBZR_REVNO=$(cd $SOURCE; bzr revno)"
51+ -DBZR_REVNO=$(cd $SOURCE; bzr revno) $CMAKE_PARAMS"
52
53 if [ -n "$BZR_SOURCE" ]; then
54 CMAKE_PARAMS="$CMAKE_PARAMS -DBZR_SOURCE=$BZR_SOURCE"
55@@ -159,14 +166,13 @@
56 echo "Use the undocumented --maint-mode if you want this automated."
57 exit 1
58 fi
59- cd "$SOURCE"
60 if [ -n "$MAINTMODE" ]; then
61 trap 'click chroot -a$ARCH -f$FRAMEWORK maint apt-get autoremove --yes $EXTRA_DEPS' \
62 EXIT HUP INT TERM
63 click chroot -a$ARCH -f$FRAMEWORK maint apt-get update
64 click chroot -a$ARCH -f$FRAMEWORK maint apt-get install --yes $EXTRA_DEPS
65 fi
66- click chroot -a$ARCH -f$FRAMEWORK run cmake $CMAKE_PARAMS
67+ click chroot -a$ARCH -f$FRAMEWORK run cmake $CMAKE_PARAMS $SOURCE
68 click chroot -a$ARCH -f$FRAMEWORK run make
69 click chroot -a$ARCH -f$FRAMEWORK run make DESTDIR=$installdir install
70 fi

Subscribers

People subscribed via source and target branches