FindPerl¶
Finds a Perl interpreter:
find_package(Perl [<version>] [...])
Perl is a general-purpose, interpreted, dynamic programming language.
Result Variables¶
This module defines the following variables:
Perl_FOUND
Добавлено в версии 3.3.
Boolean indicating whether the (requested version of) Perl executable was found.
Perl_VERSION
Добавлено в версии 4.2.
The version of Perl found.
Cache Variables¶
The following cache variables may also be set:
PERL_EXECUTABLE
Full path to the
perl
executable.
Deprecated Variables¶
The following variables are provided for backward compatibility:
PERL_FOUND
Устарело, начиная с версии 4.2: Use
Perl_FOUND
, which has the same value.Boolean indicating whether the (requested version of) Perl executable was found.
PERL_VERSION_STRING
Устарело, начиная с версии 4.2: Superseded by the
Perl_VERSION
.The version of Perl found.
Examples¶
Finding the Perl interpreter and executing it in a process:
find_package(Perl)
if(Perl_FOUND)
execute_process(COMMAND ${PERL_EXECUTABLE} --help)
endif()
See Also¶
The
FindPerlLibs
to find Perl libraries.