Add support of kind "None" for Codelite.

This commit is contained in:
Jarod42 2021-11-25 00:54:57 +01:00
parent 81460b4e47
commit c577bc84f1
4 changed files with 27 additions and 7 deletions

View File

@ -22,7 +22,7 @@
-- The capabilities of this action
valid_kinds = { "ConsoleApp", "WindowedApp", "Makefile", "SharedLib", "StaticLib", "Utility" },
valid_kinds = { "ConsoleApp", "WindowedApp", "Makefile", "None", "SharedLib", "StaticLib", "Utility" },
valid_languages = { "C", "C++" },
valid_tools = {
cc = { "gcc", "clang", "msc" }

View File

@ -86,6 +86,8 @@
ConsoleApp = "Console",
WindowedApp = "Console",
Makefile = "",
None = "",
Utility = "",
SharedLib = "Library",
StaticLib = "Library"
}
@ -189,7 +191,7 @@
end
function m.compiler(cfg)
if configuration_iscustombuild(cfg) or configuration_isfilelist(cfg) then
if cfg.project.kind == p.NONE or configuration_iscustombuild(cfg) or configuration_isfilelist(cfg) then
_p(3, '<Compiler Required="no"/>')
return
end
@ -219,7 +221,7 @@
end
function m.linker(cfg)
if configuration_iscustombuild(cfg) or configuration_isfilelist(cfg) then
if cfg.project.kind == p.NONE or configuration_iscustombuild(cfg) or configuration_isfilelist(cfg) then
_p(3, '<Linker Required="no"/>')
return
end
@ -471,6 +473,7 @@
SharedLib = "Dynamic Library",
StaticLib = "Static Library",
WindowedApp = "Executable",
None = "",
Utility = "",
}
@ -493,7 +496,7 @@
local cfgname = codelite.cfgname(cfg)
local compiler = m.getcompilername(cfg)
local debugger = m.debuggers[cfg.debugger] or m.debuggers.Default
local type = m.types[cfg.kind]
local type = m.types[cfg.kind] or ""
_x(2, '<Configuration Name="%s" CompilerType="%s" DebuggerType="%s" Type="%s" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">', cfgname, compiler, debugger, type)

View File

@ -27,6 +27,14 @@
cfg = test.getconfig(prj, "Debug")
end
function suite.OnProjectCfg_KindNone()
kind "None"
prepare()
codelite.project.compiler(cfg)
test.capture [[
<Compiler Required="no"/>
]]
end
function suite.OnProjectCfg_Compiler()
prepare()
@ -103,6 +111,15 @@
]]
end
function suite.OnProjectCfg_LinkerKindNone()
kind "None"
prepare()
codelite.project.linker(cfg)
test.capture [[
<Linker Required="no"/>
]]
end
function suite.OnProjectCfg_Linker()
prepare()
codelite.project.linker(cfg)

View File

@ -27,9 +27,9 @@ Project configurations.
### Availability ###
The **Makefile** kind is available in Premake 5.0 and later, and are supported for Visual Studio.
The **None** kind is available in Premake 5.0 and later, and are supported for gmake, gmake2 and Visual Studio.
The **Utility** kind is only available for Visual Studio and gmake2, as well as very limited support in gmake.
The **Makefile** kind is available in Premake 5.0 and later, and are supported for Visual Studio and Codelite.
The **None** kind is available in Premake 5.0 and later, and are supported for gmake, gmake2, Codelite and Visual Studio.
The **Utility** kind is only available for Visual Studio, Codelite and gmake2, as well as very limited support in gmake.
The **SharedItems** kind is only available for Visual Studio 2013 and later.
### Examples ###