summaryrefslogtreecommitdiff
path: root/owner/CMakeLists.txt
blob: 05c2d364d6d50b4cb86013d3cf2e299d48097c9c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
set(OWNER_SRCS
        owner.c
)
add_executable(hscript-printowner ${OWNER_SRCS})

install(TARGETS hscript-printowner DESTINATION bin)

IF(RSPEC_EXECUTABLE)
add_test(NAME "RSpecOwner"
    COMMAND ${RSPEC_EXECUTABLE} spec/owner_spec.rb
    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests)
set_property(TEST "RSpecOwner"
    PROPERTY ENVIRONMENT "PATH=$ENV{PATH}:${CMAKE_CURRENT_BINARY_DIR}")
ENDIF(RSPEC_EXECUTABLE)

IF(VALGRIND)
add_test(NAME "ValgrindOwner"
    COMMAND ${VALGRIND_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/hscript-printowner ${CMAKE_SOURCE_DIR})
ENDIF(VALGRIND)