Hi,
I have some issues using ccache and Qt build tools, because the content of the generated files with repc is different from time to time.
When I use the following commands, it could be possible, that the generated content inside method registerMetatypes has a different sort order:
repc -o replica Abcd.rep rep_Abcd_replica1.h
repc -o replica Abcd.rep rep_Abcd_replica2.h
repc -o replica Abcd.rep rep_Abcd_replica1.h
repc -o replica Abcd.rep rep_Abcd_replica2.h
To copy to clipboard, switch view to plain text mode
rep_Abcd_replica1.h
static void registerMetatypes()
{
static bool initialized = false;
if (initialized)
return;
initialized = true;
qRegisterMetaType<State1>();
qRegisterMetaType<State2>();
}
static void registerMetatypes()
{
static bool initialized = false;
if (initialized)
return;
initialized = true;
qRegisterMetaType<State1>();
qRegisterMetaType<State2>();
}
To copy to clipboard, switch view to plain text mode
rep_Abcd_replica2.h
static void registerMetatypes()
{
static bool initialized = false;
if (initialized)
return;
initialized = true;
qRegisterMetaType<State2>();
qRegisterMetaType<State1>();
}
static void registerMetatypes()
{
static bool initialized = false;
if (initialized)
return;
initialized = true;
qRegisterMetaType<State2>();
qRegisterMetaType<State1>();
}
To copy to clipboard, switch view to plain text mode
As you can see, the sort order for qRegisterMetaType has been changed.
The rep File itself remains unchanged.
class Abcd
{
ENUM State1 { Off=0, On }
PROP(State1 state=State1::Off SOURCEONLYSETTER)
ENUM State2 { Off=0, On }
PROP(State2 state=State2::Off SOURCEONLYSETTER)
}
class Abcd
{
ENUM State1 { Off=0, On }
PROP(State1 state=State1::Off SOURCEONLYSETTER)
ENUM State2 { Off=0, On }
PROP(State2 state=State2::Off SOURCEONLYSETTER)
}
To copy to clipboard, switch view to plain text mode
Is it not possible, to generate always the same content?
Bookmarks