FindPerl¶
尋找 Perl 直譯器:
find_package(Perl [<version>] [...])
Perl is a general-purpose, interpreted, dynamic programming language.
結果變數¶
該模組定義了以下變數:
Perl_FOUND在 3.3 版被加入.
布林值,表示是否找到了(所請求版本的)Perl 執行檔。
Perl_VERSION在 4.2 版被加入.
找到的 Perl 的版本。
快取變數¶
還可能設定以下變數:
PERL_EXECUTABLEperl執行檔的完整路徑。
棄用的變數¶
The following variables are provided for backward compatibility:
PERL_FOUND在 4.2 版之後被棄用: Use
Perl_FOUND, which has the same value.布林值,表示是否找到了(所請求版本的)Perl 執行檔。
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.