blob: e95cd15161775ab77614bd495a4640e6fbf6e68d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
function(get_test_prerequirements found_var config_file)
if(CMAKE_CURRENT_BINARY_DIR MATCHES " ")
# rpmbuild can't handle spaces in path
return()
endif()
find_program(RPM_EXECUTABLE rpm)
find_program(RPMBUILD_EXECUTABLE rpmbuild)
if(RPM_EXECUTABLE AND RPMBUILD_EXECUTABLE)
file(WRITE "${config_file}" "set(RPM_EXECUTABLE \"${RPM_EXECUTABLE}\")")
file(APPEND "${config_file}"
"\nset(RPMBUILD_EXECUTABLE \"${RPMBUILD_EXECUTABLE}\")")
set(${found_var} true PARENT_SCOPE)
endif()
# optional tool for some tests
find_program(OBJDUMP_EXECUTABLE objdump)
if(OBJDUMP_EXECUTABLE)
file(APPEND "${config_file}"
"\nset(OBJDUMP_EXECUTABLE \"${OBJDUMP_EXECUTABLE}\")")
endif()
endfunction()
|