summaryrefslogtreecommitdiff
path: root/cryptominisat5/cryptominisat-5.6.3/cmake/AddGTestSuite.cmake
blob: 0dbe1ec028a1a9d25eacb8ad2b80957b7cfce8c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Sets for the current directory (and below) the testsuite to use.
# This macro should be used with the AddSTPGTest function.
macro(AddGTestSuite TESTSUITENAME)
    set(TESTSUITE "${TESTSUITENAME}") # Unit test group name
    # Setup custom target
    add_custom_target(${TESTSUITE})
    add_dependencies(check ${TESTSUITE})

    if(USE_VALGRIND)
        set(LIT_EXTRA_FLAGS --vg --vg-leak)
    else()
        set(LIT_EXTRA_FLAGS "")
    endif()

    add_custom_command(TARGET ${TESTSUITE}
                       POST_BUILD
                       COMMAND ${LIT_TOOL} ${LIT_ARGS} ${LIT_EXTRA_FLAGS} ${CMAKE_CURRENT_BINARY_DIR}
                       COMMENT "Running ${TESTSUITE}"
                      )

    # Setup lit configuration
    configure_file(${CMAKE_SOURCE_DIR}/tests/lit-unit-tests-common.site.cfg.in
                   ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
                   @ONLY@
                  )
endmacro()
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback