[CMake] CMake with Lua Experiment

E. Wing ewmailing at gmail.com
Mon Dec 10 08:04:59 EST 2007


> - The source code seems to have been crappified by windows.  There's
> missing +x permissions on executable files and cr-lf linefeeds everywhere.
>
> - The source does:
> #include <lua.h>
> but the bootstrap/cmakelists.xt does not search for paths to it.  Under
> my Ubuntu box, lua.h is located in lua5.1/lua.h or lua5.0/lua.h, not
> under the main /usr/include.

So I'm wondering if there is a cleaned up version of the code yet. I'm
having a hard time dealing with both the cr-lf and the Lua detection
on my Mac.

> - The approach of a single cmCommand.cxx to parse functions is probably
> limiting as it makes it harder to make the command syntax more flexible.

I wanted to comment on this. I think this is a workable situation. I
was thinking, instead of trying to change things at the C++ level, it
would be a lot easier to handle this at the Lua level. We can create a
CMake/LuaUtility module which always gets included and create a public
API there. Each public API function in here basically just calls the
CMake/Lua function that was binded in cmCommand.cxx. But in the
utility module, we do all the argument parsing and validation we see
fit.

I've submitted an example and updated the page:
http://www.cmake.org/Wiki/CMake:Experiments_With_Lua

The example shows different ways scripters may want to pass files to
add_library and a simple function that handles it.

Thanks,
Eric


More information about the CMake mailing list