lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I wanted to drop by and post a message in light of the recent activity on
this list. First, a hats-off to the Lua community. While I have only used it
a bit, I like what I have seen and especially like the light weight nature
of Lua. I was able to write a CMakelists file to build Lua, link it into
CMake and integrate it as an alternative language for CMake in matter of a
couple days. That says a lot for Lua, that it is well documented and easy to
integrate and just plain works well. All in all it was a very nice
experience. 

The future of that experiment is up in the air right now. Lua is clearly a
better language than what CMake uses but back in 1999/2000 we just did not
know about Lua and the languages we did know, such as Tcl, had become rather
heavyweight. Fast forward to today and we have eight years of CMake script
we have to support (backwards compatibility is a must) and CMake itself
comes with thousands of lines of CMake script that users can use to find
different packages, test for compiler features, etc. Basically a huge amount
of system introspection code written in CMake, to support a very wide range
of platforms and features that users may be interested in. So the question
becomes one of adding Lua and supporting both languages or just keeping what
we have. Adding Lua is not a dead issue, just one that is not easy to decide
so we are taking some time to make the decision.
 
Regarding the build tool X versus CMake thread I just want to say that if
you have any questions or suggestions on CMake I would be happy to discuss
them. Optionally offline or on the cmake mailing list
http://www.cmake.org/mailman/listinfo/cmake as I would *guess* the Lua list
may be sick of this issue already, although I do not want to speak for you
all. If I can't help I can pass it on to one of the other main developers
Bill Hoffman, Brad King, Alex Neundorf, Dave Cole, and Clinton Stimpson. The
CMake community is generally a friendly, helpful, and respectful group.
Honest we are :)

I believe in one of the threads there was a comment about CMake being ugly.
We are trying to get a handle on that and we would love any feedback on that
score in terms of what is ugly. The language syntax? the user experience?
the internal code style? the architecture? We are always working to make
CMake better so any feedback would be greatly appreciated.

Thanks and sorry for the lengthy post (I know TLDR :)
Ken

Ken Martin PhD 
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971 

P.S. For kicks and giggles here are the CMake list files for Lua, they are
almost certainly missing some features to optimally/correctly build Lua but
they give you a feel for it and they worked for my purposes.

---------------------------------------------------
-- Lua/CMakeLists.txt
---------------------------------------------------
project (LUA C)

# the following two variables are defined for the use of packages 
# that wish to link or compile against lua
set (LUA_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src")
set (LUA_LIBRARIES lua)

add_subdirectory (src)

----------------------------------------------------
-- lua/src/CMakeLists.txt
---------------------------------------------------
# define the lua core source files
set (LUA_CORE_SRCS lapi.c lcode.c ldebug.c ldo.c ldump.c 
     lfunc.c lgc.c llex.c lmem.c lobject.c lopcodes.c
     lparser.c lstate.c lstring.c ltable.c ltm.c  lundump.c
     lvm.c lzio.c)

# define the lua lib source files
set (LUA_LIB_SRCS lauxlib.c lbaselib.c ldblib.c liolib.c
     lmathlib.c loslib.c ltablib.c lstrlib.c loadlib.c linit.c)

# create the library
add_library (lua ${LUA_LIB_SRCS} ${LUA_CORE_SRCS})

# create the lue executable and link it to the lib
add_executable (luaexec lua.c)
target_link_libraries (luaexec lua)

# name the executable lua just like the library
set_target_properties(luaexec PROPERTIES OUTPUT_NAME lua)

# create the luac thing (I have no clue) and link it
add_executable (luac luac.c print.c)
target_link_libraries (luac lua)