FindPerl¶
Finds a Perl interpreter:
find_package(Perl [<version>] [...])
Perl is a general-purpose, interpreted, dynamic programming language.
結果變數¶
該模組定義了以下變數:
Perl_FOUND
在 3.3 版被加入.
Boolean indicating whether the (requested version of) Perl executable was found.
Perl_VERSION
在 4.2 版被加入.
The version of Perl found.
快取變數¶
The following cache variables may also be set:
PERL_EXECUTABLE
Full path to the
perl
executable.
已棄用的變數¶
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.
範例¶
Finding the Perl interpreter and executing it in a process:
find_package(Perl)
if(Perl_FOUND)
execute_process(COMMAND ${PERL_EXECUTABLE} --help)
endif()
另請參見¶
The
FindPerlLibs
to find Perl libraries.