mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-15 05:58:30 +01:00
generator.lua: prepare for comments
This commit is contained in:
@@ -8,6 +8,7 @@ local script_args = {...}
|
|||||||
local COMPILER = script_args[1]
|
local COMPILER = script_args[1]
|
||||||
local INTERNAL_GENERATION = script_args[2]:match("internal") and true or false
|
local INTERNAL_GENERATION = script_args[2]:match("internal") and true or false
|
||||||
local FREETYPE_GENERATION = script_args[2]:match("freetype") and true or false
|
local FREETYPE_GENERATION = script_args[2]:match("freetype") and true or false
|
||||||
|
local COMMENTS_GENERATION = script_args[2]:match("comments") and true or false
|
||||||
local IMGUI_PATH = os.getenv"IMGUI_PATH" or "../imgui"
|
local IMGUI_PATH = os.getenv"IMGUI_PATH" or "../imgui"
|
||||||
local CFLAGS = ""
|
local CFLAGS = ""
|
||||||
local CPRE,CTEST
|
local CPRE,CTEST
|
||||||
@@ -31,10 +32,10 @@ if FREETYPE_GENERATION then
|
|||||||
end
|
end
|
||||||
|
|
||||||
if COMPILER == "gcc" or COMPILER == "clang" then
|
if COMPILER == "gcc" or COMPILER == "clang" then
|
||||||
CPRE = COMPILER..[[ -E -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS -DIMGUI_API="" -DIMGUI_IMPL_API="" ]] .. CFLAGS
|
CPRE = COMPILER..(COMMENTS_GENERATION and " -C " or "")..[[ -E -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS -DIMGUI_API="" -DIMGUI_IMPL_API="" ]] .. CFLAGS
|
||||||
CTEST = COMPILER.." --version"
|
CTEST = COMPILER.." --version"
|
||||||
elseif COMPILER == "cl" then
|
elseif COMPILER == "cl" then
|
||||||
CPRE = COMPILER..[[ /E /DIMGUI_DISABLE_OBSOLETE_FUNCTIONS /DIMGUI_DEBUG_PARANOID /DIMGUI_API="" /DIMGUI_IMPL_API="" ]] .. CFLAGS
|
CPRE = COMPILER..(COMMENTS_GENERATION and " /C " or "")..[[ /E /DIMGUI_DISABLE_OBSOLETE_FUNCTIONS /DIMGUI_DEBUG_PARANOID /DIMGUI_API="" /DIMGUI_IMPL_API="" ]] .. CFLAGS
|
||||||
CTEST = COMPILER
|
CTEST = COMPILER
|
||||||
else
|
else
|
||||||
print("Working without compiler ")
|
print("Working without compiler ")
|
||||||
@@ -63,6 +64,7 @@ assert(HAVE_COMPILER,"gcc, clang or cl needed to run script")
|
|||||||
print("HAVE_COMPILER",HAVE_COMPILER)
|
print("HAVE_COMPILER",HAVE_COMPILER)
|
||||||
print("INTERNAL_GENERATION",INTERNAL_GENERATION)
|
print("INTERNAL_GENERATION",INTERNAL_GENERATION)
|
||||||
print("FREETYPE_GENERATION",FREETYPE_GENERATION)
|
print("FREETYPE_GENERATION",FREETYPE_GENERATION)
|
||||||
|
print("COMMENTS_GENERATION",COMMENTS_GENERATION)
|
||||||
print("CPRE",CPRE)
|
print("CPRE",CPRE)
|
||||||
--------------------------------------------------------------------------
|
--------------------------------------------------------------------------
|
||||||
--this table has the functions to be skipped in generation
|
--this table has the functions to be skipped in generation
|
||||||
|
Reference in New Issue
Block a user