~ubuntu-branches/ubuntu/wily/cmocka/wily

« back to all changes in this revision

Viewing changes to example/CMakeLists.txt

  • Committer: Package Import Robot
  • Author(s): David Prévot, Andreas Schneider, David Prévot
  • Date: 2014-04-13 10:43:02 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140413104302-q1x223agjm8n57uj
Tags: 0.4.0-1
[ Andreas Schneider ]
* Bump version to 0.4.0.

[ David Prévot ]
* Use dh_doxygen to get rid of *.md5 and *.map files
* Provide jQuery helper for cmocka-doc

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
set_source_files_properties(
10
10
    calculator.c
11
 
    calculator_test.c
12
11
    allocate_module.c
13
 
    allocate_module_test.c
14
 
    run_tests.c
 
12
    assert_module.c
15
13
    PROPERTIES
16
 
        COMPILE_FLAGS -DUNIT_TESTING=1)
17
 
 
18
 
add_executable(fixture_test fixture_test.c)
19
 
target_link_libraries(fixture_test ${CMOCKA_SHARED_LIBRARY})
20
 
 
21
 
add_test(fixture_test ${CMAKE_CURRENT_BINARY_DIR}/fixture_test)
 
14
        COMPILE_DEFINITIONS UNIT_TESTING=1)
 
15
 
 
16
### The most simple test
 
17
add_executable(simple_test simple_test.c)
 
18
target_link_libraries(simple_test ${CMOCKA_SHARED_LIBRARY})
 
19
 
 
20
add_test(simple_test ${CMAKE_CURRENT_BINARY_DIR}/simple_test)
22
21
 
23
22
add_executable(calculator_test calculator.c calculator_test.c)
24
23
target_link_libraries(calculator_test ${CMOCKA_SHARED_LIBRARY})
51
50
add_executable(assert_module_test assert_module.c assert_module_test.c)
52
51
target_link_libraries(assert_module_test ${CMOCKA_SHARED_LIBRARY})
53
52
 
54
 
add_test(assert_module_test ${CMAKE_CURRENT_BINARY_DIR}/assert_macro_test)
 
53
add_test(assert_module_test ${CMAKE_CURRENT_BINARY_DIR}/assert_module_test)
55
54
set_tests_properties(
56
55
    assert_module_test
57
56
        PROPERTIES
80
79
        "\\[  FAILED  \\] 2 test"
81
80
)
82
81
 
83
 
add_executable(run_tests run_tests.c)
84
 
target_link_libraries(run_tests ${CMOCKA_SHARED_LIBRARY})
85
 
 
86
 
add_test(run_tests ${CMAKE_CURRENT_BINARY_DIR}/run_tests)
87
 
 
88
 
if (${CMAKE_C_COMPILER_ID} MATCHES "(GNU|Clang)")
 
82
# TODO Execute "$CMAKE_LINKER --help" and check for --wrap
 
83
if (${CMAKE_C_COMPILER_ID} MATCHES "(GNU|Clang)" AND NOT APPLE)
89
84
    add_subdirectory(chef_wrap)
90
85
endif()