1 Replies - 133 Views - Last Post: 04 September 2017 - 05:41 AM

#1 waruqi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 04-September 17

A cross-platform C/C++ build utility based on Lua

Posted 04 September 2017 - 02:35 AM

Introduction

xmake is a cross-platform build utility based on lua.

The project focuses on making development and building easier and provides many features (.e.g package, install, plugin, macro, action, option, task ...), so that any developer can quickly pick it up and enjoy the productivity boost when developing and building project.

If you want to known more, please refer to:

HomePage
Github
UsageVideo

Simple description

target("console")
    set_kind("binary")
    add_files("src/*.c") 


Build project

$ xmake


Run target

$ xmake run console


Debug target

$ xmake run -d console


Support features

Tasks
Macros
Actions
Options
Plugins
Templates

Support platforms

Windows (x86, x64, amd64, x86_amd64)
Macosx (i386, x86_64)
Linux (i386, x86_64, cross-toolchains ...)
Android (armv5te, armv6, armv7-a, armv8-a, arm64-v8a)
iPhoneOS (armv7, armv7s, arm64, i386, x86_64)
WatchOS (armv7k, i386)
Mingw (i386, x86_64)

Support Languages

C/C++
Objc/Objc++
Swift
Assembly
Golang
Rust
Dlang

Builtin Plugins

Macros script plugin
Run the custom lua script plugin
Generate IDE project file plugin(makefile, vs2002 - vs2017 .. )
Generate doxygen document plugin

Examples

The simple xmake.lua file:

-- the debug mode
if is_mode("debug") then
    
    -- enable the debug symbols
    set_symbols("debug")

    -- disable optimization
    set_optimize("none")
end

-- the release mode
if is_mode("release") then

    -- set the symbols visibility: hidden
    set_symbols("hidden")

    -- enable fastest optimization
    set_optimize("fastest")

    -- strip all symbols
    set_strip("all")
end

-- add target
target("test")

    -- set kind
    set_kind("static")

    -- add files
    add_files("src/*.c") 


Is This A Good Question/Topic? 0
  • +

Replies To: A cross-platform C/C++ build utility based on Lua

#2 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 5828
  • View blog
  • Posts: 19,868
  • Joined: 05-May 12

Re: A cross-platform C/C++ build utility based on Lua

Posted 04 September 2017 - 05:41 AM

Moved to share your project...
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1