~alecu/unity-scope-click/separate-scopes-category

« back to all changes in this revision

Viewing changes to src/tests/CMakeLists.txt

  • Committer: Michael McCracken
  • Date: 2014-01-13 18:34:32 UTC
  • mto: This revision was merged to the branch mainline in revision 105.
  • Revision ID: mike.mccracken@canonical.com-20140113183432-6j9mnq69fjprt9tx
Add initial C++ click scope code

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
SET (TESTS_TARGET click-scope-tests)
 
2
 
 
3
# Qt5 bits
 
4
SET (CMAKE_INCLUDE_CURRENT_DIR ON)
 
5
SET (CMAKE_AUTOMOC ON)
 
6
find_package(Qt5Core REQUIRED)
 
7
 
 
8
FILE (GLOB TEST_SOURCES *.cpp)
 
9
FILE (GLOB TEST_HEADERS *.h)
 
10
 
 
11
add_executable (${TESTS_TARGET}
 
12
  ${TEST_SOURCES}
 
13
  ${TEST_HEADERS}
 
14
)
 
15
 
 
16
qt5_use_modules (${TESTS_TARGET} Core DBus Network Test)
 
17
 
 
18
target_include_directories ( ${TESTS_TARGET} PUBLIC ${CMAKE_SOURCE_DIR}/src )
 
19
target_link_libraries ( ${TESTS_TARGET}
 
20
  ${UNITY_SCOPES_LDFLAGS}
 
21
  ${UBUNTUONE_LDFLAGS}
 
22
  )
 
23
target_link_libraries ( ${TESTS_TARGET}
 
24
  -Wl,-rpath,${CMAKE_BINARY_DIR}/src
 
25
  -L${CMAKE_BINARY_DIR}/src
 
26
  ${SCOPE_LIB_NAME}
 
27
  )
 
28
 
 
29
add_custom_target(click-scope-tests-valgrind
 
30
    COMMAND "valgrind --tool=memcheck ${CMAKE_CURRENT_BINARY_DIR}/${TESTS_TARGET}"
 
31
    DEPENDS ${TESTS_TARGET}
 
32
)
 
33
 
 
34
add_custom_target(click-scope-tests-valgrind-leaks
 
35
    COMMAND "valgrind --tool=memcheck --track-origins=yes --num-callers=40 --leak-resolution=high --leak-check=full ${CMAKE_CURRENT_BINARY_DIR}/${TESTS_TARGET}"
 
36
    DEPENDS ${TESTS_TARGET}
 
37
)