add features

- add LIBCMO_BUILD_DEBUG and etc build macro.
- add notify in CKGlobals for CKMesh and etc.
- add test command.
This commit is contained in:
2023-09-20 20:44:03 +08:00
parent 81872053f0
commit 0bc99d6f39
7 changed files with 66 additions and 33 deletions

View File

@ -128,6 +128,12 @@ namespace Unvirt::Context {
)
)
)
->Then((new CmdHelper::Literal("test"))
->Executes(
std::bind(&UnvirtContext::ProcTest, this, std::placeholders::_1),
"Call custom debugging function (only available in Debug mode)."
)
)
->Then((new CmdHelper::Literal("help"))
->Executes(
std::bind(&UnvirtContext::ProcHelp, this, std::placeholders::_1),
@ -433,6 +439,16 @@ namespace Unvirt::Context {
}
}
void Unvirt::Context::UnvirtContext::ProcTest(const CmdHelper::ArgumentsMap* amap) {
#if defined(LIBCMO_BUILD_DEBUG)
// MARK: Add the debug code here.
#else
PrintCommonError("Test command only available in Debug mode.");
#endif
}
void Unvirt::Context::UnvirtContext::ProcHelp(const CmdHelper::ArgumentsMap*) {
m_Help->Print();
}