91e6b23d3f
NMAKE-VS2012 Error LNK2011 while NMAKE-VS2010 does not complain we need to link the pch.obj file see http://msdn.microsoft.com/en-us/library/3ay26wa2(v=vs.110).aspx ** PCH Support for Ninja Ninja need to add property OBJECT_DEPENDS for using PCH OBJECT_OUTPUTS for create PCH see http://public.kitware.com/pipermail/cmake-developers/2012-March/003653.html
24 lines
649 B
Lua
24 lines
649 B
Lua
-- A reference id : object like a string but for reference ids
|
|
|
|
|
|
r2.RefIdMetatable =
|
|
{
|
|
__eq = function(op1, op2) return op1.Value == op2.Value end,
|
|
__le = function(op1, op2) return op1.Value <= op2.Value end,
|
|
__lt = function(op1, op2) return op1.Value < op2.Value end,
|
|
__tostring = function(op) return op.Value end
|
|
}
|
|
|
|
|
|
|
|
function r2.RefId(value)
|
|
assert(value ~= r2) -- in case of r2:RefId(value)
|
|
if value == nil then value = "" end
|
|
local refId = { Value = tostring(value) }
|
|
setmetatable(refId, r2.RefIdMetatable)
|
|
return refId
|
|
end
|
|
|
|
function r2.isRefId(value)
|
|
return type(value) == "table" and getmetatable(value) == r2.RefIdMetatable
|
|
end
|