FindPerl¶
尋找 Perl 直譯器:
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 版被加入.
找到的 Perl 的版本。
快取變數¶
The following cache variables may also be set:
PERL_EXECUTABLEperl執行檔的完整路徑。
已棄用的變數¶
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 版之後被棄用: 被
Perl_VERSION取代。找到的 Perl 的版本。
範例¶
Finding the Perl interpreter and executing it in a process:
find_package(Perl)
if(Perl_FOUND)
execute_process(COMMAND ${PERL_EXECUTABLE} --help)
endif()
另請參見¶
The
FindPerlLibsto find Perl libraries.