Merge lp:~thomir-deactivatedaccount/xpathselect/static-build into lp:xpathselect

Proposed by Thomi Richards
Status: Merged
Merged at revision: 14
Proposed branch: lp:~thomir-deactivatedaccount/xpathselect/static-build
Merge into: lp:xpathselect
Diff against target: 49 lines (+6/-5)
2 files modified
lib/CMakeLists.txt (+4/-3)
lib/xpathselect.cpp (+2/-2)
To merge this branch: bzr merge lp:~thomir-deactivatedaccount/xpathselect/static-build
Reviewer Review Type Date Requested Status
jenkins (community) continuous-integration Needs Fixing
Brandon Schaefer (community) Approve
Review via email: mp+119223@code.launchpad.net

Commit message

Make library build statically.

Description of the change

XPathSelect needs to be built as a static library, due to the way the Qt testability system works.

To post a comment you must log in.
Revision history for this message
Brandon Schaefer (brandontschaefer) :
review: Approve
Revision history for this message
jenkins (martin-mrazik+qa) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/CMakeLists.txt'
2--- lib/CMakeLists.txt 2012-08-10 20:33:20 +0000
3+++ lib/CMakeLists.txt 2012-08-11 01:51:18 +0000
4@@ -1,11 +1,11 @@
5 FIND_PACKAGE( Boost 1.40 REQUIRED )
6 INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
7
8-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wl,--no-undefined")
9+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -std=c++11 -Wall -Wl,--no-undefined")
10 set(SOURCES node.cpp xpathselect.h xpathselect.cpp utils.h utils.cpp)
11 set(HEADERS node.h xpathselect.h)
12
13-add_library(xpathselect SHARED ${SOURCES})
14+add_library(xpathselect STATIC ${SOURCES})
15
16 target_link_libraries(xpathselect ${Boost_LIBRARIES})
17
18@@ -15,7 +15,8 @@
19 SOVERSION 1.0)
20
21 install(TARGETS xpathselect
22- LIBRARY DESTINATION lib)
23+ LIBRARY DESTINATION lib
24+ ARCHIVE DESTINATION lib)
25
26 install(FILES ${HEADERS}
27 DESTINATION include/${PROJECT_NAME})
28
29=== modified file 'lib/xpathselect.cpp'
30--- lib/xpathselect.cpp 2012-08-10 20:33:20 +0000
31+++ lib/xpathselect.cpp 2012-08-11 01:51:18 +0000
32@@ -137,7 +137,7 @@
33 queue.push(root);
34 while (!queue.empty())
35 {
36- Node::Ptr const& node = queue.front();
37+ Node::Ptr node = queue.front();
38 queue.pop();
39 if (query_parts.front().Matches(node))
40 {
41@@ -146,7 +146,7 @@
42 matches.push_back(node);
43 }
44 // Add all children of current node to queue.
45- for(Node::Ptr const& child : node->Children())
46+ for(Node::Ptr child : node->Children())
47 {
48 queue.push(child);
49 }

Subscribers

People subscribed via source and target branches

to all changes: