|
|
(7 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
| Here (http://www.cmake.org/Wiki/Image:CMakeLua.zip) is a source tree for a CMake that also accepts Lua as input. All cmake commands are wrapped and one (get_property) has also been converted to be a function as a test case. This is just an experiment. There is a LuaTest test case (found under CMake/Tests) that works and is shown below. All cmake commands are lower case and are prepended with cm_. I'm not well versed on Lua and this is not a complete conversion. If a listfile ends in .lua then it will be parsed as lua code, otherwise it will be parsed using the usual CMake language.
| | {{CMake/Template/Moved}} |
|
| |
|
| <pre>
| | This page has moved [https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/dev/Experiments-With-Lua here]. |
| -- a simple test case
| |
| cm_project ("LuaTest");
| |
| | |
| cm_add_executable ("LuaTest", "simple.cxx");
| |
| | |
| sources = {
| |
| "simpleLib.cxx",
| |
| "simpleCLib.c",
| |
| "simpleWe.cpp"
| |
| }
| |
| | |
| cm_add_library ("simpleLib", "STATIC", unpack(sources));
| |
| | |
| cm_target_link_libraries ("LuaTest", "simpleLib");
| |
| | |
| print("The location of simpleLib is: " ..
| |
| cm_get_property("TARGET", "simpleLib", "LOCATION"));
| |
| </pre>
| |
Latest revision as of 15:40, 30 April 2018