mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-23 10:04:05 +08:00
Don't assume a Perl script can be run directly as a command.
That's not the case on Windows - it doesn't support #!. Look for the perl interpreter and, if we find it, add a rule that runs tests/TESTrun with the interpreter.
This commit is contained in:
parent
d0963e4032
commit
74224d189c
@ -1200,6 +1200,15 @@ add_custom_target(uninstall
|
||||
|
||||
#
|
||||
# Tcpdump tests
|
||||
# We try to find the Perl interpreter and, if we do, we have the check
|
||||
# rule run tests/TESTrun with it, because just trying to run the TESTrun
|
||||
# script as a command won't work on Windows.
|
||||
#
|
||||
add_custom_target(check
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/tests/TESTrun)
|
||||
find_program(PERL perl)
|
||||
if(PERL)
|
||||
message(STATUS "Found perl at ${PERL}")
|
||||
add_custom_target(check
|
||||
COMMAND ${PERL} ${CMAKE_SOURCE_DIR}/tests/TESTrun)
|
||||
else()
|
||||
message(STATUS "Didn't find perl")
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user