FindTclsh¶
Finds the Tcl shell command-line executable (tclsh), which includes the Tcl
(Tool Command Language) interpreter:
find_package(Tclsh [<version>] [...])
結果變數¶
該模組定義了以下變數:
Tclsh_FOUND在 3.3 版被加入.
Boolean indicating whether the (requested version of)
tclshexecutable was found.Tclsh_VERSION在 4.2 版被加入.
The version of
tclshfound.
快取變數¶
The following cache variables may also be set:
TCL_TCLSHThe path to the
tclshexecutable.
已棄用的變數¶
The following variables are provided for backward compatibility:
TCLSH_FOUND在 4.2 版之後被棄用: Use
Tclsh_FOUND, which has the same value.Boolean indicating whether the (requested version of)
tclshexecutable was found.TCLSH_VERSION_STRING在 4.2 版之後被棄用: Use
Tclsh_VERSION, which has the same value.The version of
tclshfound.
範例¶
In the following example, this module is used to find the tclsh
command-line executable, which is then executed in a process to evaluate
TCL code from the script file located in the project source directory:
find_package(Tclsh)
if(Tclsh_FOUND)
execute_process(COMMAND ${TCL_TCLSH} example-script.tcl)
endif()
另請參見¶
The
FindTCLmodule to find the Tcl installation.The
FindTclStubmodule to find the Tcl Stubs Library.