Merge lp:~qcumber-some/widelands/bug961548 into lp:widelands

Proposed by Jens Beyer
Status: Merged
Merged at revision: 6351
Proposed branch: lp:~qcumber-some/widelands/bug961548
Merge into: lp:widelands
Diff against target: 72 lines (+9/-9)
5 files modified
CMakeLists.txt (+5/-5)
src/CMakeLists.txt (+1/-1)
src/economy/test/CMakeLists.txt (+1/-1)
src/io/filesystem/test/CMakeLists.txt (+1/-1)
src/scripting/test/CMakeLists.txt (+1/-1)
To merge this branch: bzr merge lp:~qcumber-some/widelands/bug961548
Reviewer Review Type Date Requested Status
Widelands Developers Pending
Review via email: mp+102581@code.launchpad.net

Description of the change

Separate the libraries to link against if unit tests are enabled.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2012-04-02 16:02:45 +0000
3+++ CMakeLists.txt 2012-04-18 20:14:23 +0000
4@@ -107,11 +107,11 @@
5 # unit_test_framework is for testing only
6 if (WL_UNIT_TESTS)
7 message(STATUS "Enabled unit tests")
8-if (DEFINED MSVC)
9- set (BUILD_SHARED_LIBS OFF)
10-else (DEFINED MSVC)
11- set (Boost_USE_STATIC_LIBS OFF)
12-endif (DEFINED MSVC)
13+ if (DEFINED MSVC)
14+ set (BUILD_SHARED_LIBS OFF)
15+ else (DEFINED MSVC)
16+ set (Boost_USE_STATIC_LIBS OFF)
17+ endif (DEFINED MSVC)
18 set (Boost_FIND_COMPONENTS unit_test_framework signals)
19 set (Boost_USE_MULTITHREADED ON)
20 set (Boost_DETAILED_FAILURE_MSG ON)
21
22=== modified file 'src/CMakeLists.txt'
23--- src/CMakeLists.txt 2012-03-03 19:23:20 +0000
24+++ src/CMakeLists.txt 2012-04-18 20:14:23 +0000
25@@ -122,7 +122,7 @@
26 target_link_libraries(widelands_all ${ZLIB_LIBRARY})
27 target_link_libraries(widelands_all ${OPENGL_gl_LIBRARY})
28 target_link_libraries(widelands_all ${GLEW_LIBRARY})
29-target_link_libraries(widelands_all ${Boost_LIBRARIES})
30+target_link_libraries(widelands_all ${Boost_SIGNALS_LIBRARY})
31 if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
32 target_link_libraries(widelands_all ${EXECINFO_LIBRARY})
33 endif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
34
35=== modified file 'src/economy/test/CMakeLists.txt'
36--- src/economy/test/CMakeLists.txt 2011-01-21 18:20:25 +0000
37+++ src/economy/test/CMakeLists.txt 2012-04-18 20:14:23 +0000
38@@ -3,7 +3,7 @@
39 add_executable(test_economy ${WL_TEST_ECONOMY_SRCS} ${TEST_EXTRA_SOURCES})
40
41 target_link_libraries(test_economy widelands_all)
42-target_link_libraries(test_economy ${Boost_LIBRARIES})
43+target_link_libraries(test_economy ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
44 target_link_libraries(test_economy ${TEST_EXTRA_LIBS})
45
46 add_test(test_economy test_economy)
47
48=== modified file 'src/io/filesystem/test/CMakeLists.txt'
49--- src/io/filesystem/test/CMakeLists.txt 2011-02-11 20:45:58 +0000
50+++ src/io/filesystem/test/CMakeLists.txt 2012-04-18 20:14:23 +0000
51@@ -3,7 +3,7 @@
52 add_executable(test_io_filesystem ${WL_TEST_IO_FILESYSTEM_SRCS} ${TEST_EXTRA_SOURCES})
53
54 target_link_libraries(test_io_filesystem widelands_all)
55-target_link_libraries(test_io_filesystem ${Boost_LIBRARIES})
56+target_link_libraries(test_io_filesystem ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
57 target_link_libraries(test_io_filesystem ${TEST_EXTRA_LIBS})
58
59 add_test(test_io_filesystem test_io_filesystem)
60
61=== modified file 'src/scripting/test/CMakeLists.txt'
62--- src/scripting/test/CMakeLists.txt 2011-01-21 18:20:25 +0000
63+++ src/scripting/test/CMakeLists.txt 2012-04-18 20:14:23 +0000
64@@ -3,7 +3,7 @@
65 add_executable(test_widelands_scripting ${WL_SCRIPTING_TEST_SRCS} ${TEST_EXTRA_SOURCES})
66
67 target_link_libraries(test_widelands_scripting widelands_all)
68-target_link_libraries(test_widelands_scripting ${Boost_LIBRARIES})
69+target_link_libraries(test_widelands_scripting ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
70 target_link_libraries(test_widelands_scripting ${TEST_EXTRA_LIBS})
71
72 add_test(test_widelands_scripting test_widelands_scripting)

Subscribers

People subscribed via source and target branches

to status/vote changes: