summaryrefslogtreecommitdiff
path: root/make/code_format.lua
blob: f884c9af2fbe7d0fc400481e5fca4f73285ca597 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
local lm = require 'luamake'

lm.c = lm.compiler == 'msvc' and 'c89' or 'c11'
lm.cxx = 'c++17'

lm:source_set 'code_format' {
    rootdir = '../3rd/EmmyLuaCodeStyle',
    includes = {
        "Util/include",
        "CodeFormatCore/include",
        "LuaParser/include",
        "../bee.lua/3rd/lua",
        "3rd/wildcards/include"
    },
    sources = {
        -- codeFormatLib
        "CodeFormatLib/src/*.cpp",
        -- LuaParser
        "LuaParser/src/**/*.cpp",
        -- Util
        "Util/src/StringUtil.cpp",
        "Util/src/Utf8.cpp",
        "Util/src/SymSpell/*.cpp",
        "Util/src/InfoTree/*.cpp",
        --CodeService
        "CodeFormatCore/src/**/*.cpp",
    },
    windows = {
        flags = "/utf-8",
    },
    macos = {
        flags = "-Wall -Werror",
    },
    linux = {
        flags = "-Wall -Werror"
    }
}