[CMake] Announcing CMake BASIS, a set of CMake based project interoperability and automation tools

Andreas Schuh andreas.schuh.84 at gmail.com
Thu Jan 23 08:18:16 EST 2014


Find one minor correction to my previous post below.

On Jan 23, 2014, at 1:11 PM, Andreas Schuh <andreas.schuh.84 at gmail.com> wrote:

> For example, in case of Python, you can “wrap” the script and have it act as both Windows NT Script and Python script by adding the following line at the top
> 
> @setlocal enableextensions & "/path/to/required/python/version" -x "%~f0" %* & goto :EOF
> % Any Python code goes below this line
> 
> Python will ignore the first line. In case of Perl, however, you need to do a bit more:
> 
> @goto = "START_OF_BATCH” ;
> @goto = ();
> % Any Perl code goes in between these lines
> __END__:
> “START_OF_BATCH"
> @“/path/to/required/perl" -w -S "%~f0" %*
> 
> As this modified Perl script is no longer valid Perl 
> 

Actually the neat thing about this added code is that it is both, valid Perl and valid Windows NT Script syntax. It is thus mostly about wrapping scripts automatically as well as replacing the path to the found interpreter executable.

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140123/c23cabc9/attachment.html>


More information about the CMake mailing list