blob: e445deed61d5e951a58387b3b3e9ba434b4a8d5e (
plain) (
blame)
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
|
pkg_check_modules(CURL libcurl)
set(FETCH_SRCS
fetch.cc
)
add_executable(hscript-fetch ${FETCH_SRCS})
IF(CURL_FOUND)
add_definitions(-DHAVE_LIBCURL)
target_link_libraries(hscript-fetch ${CURL_LIBRARIES})
ENDIF(CURL_FOUND)
install(TARGETS hscript-fetch DESTINATION bin)
IF(RSPEC_EXECUTABLE)
add_test(NAME "RSpecFetch"
COMMAND ${RSPEC_EXECUTABLE} spec/fetch_spec.rb
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests)
set_property(TEST "RSpecFetch"
PROPERTY ENVIRONMENT "PATH=$ENV{PATH}:${CMAKE_CURRENT_BINARY_DIR}")
ENDIF(RSPEC_EXECUTABLE)
IF(VALGRIND)
add_test(NAME "ValgrindFetch"
COMMAND ${VALGRIND_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/hscript-fetch https://horizon.adelielinux.org/example.installfile)
ENDIF(VALGRIND)
|