Adapt to changes in c++utilities
This commit is contained in:
parent
8cac133104
commit
6542eab80d
|
@ -81,10 +81,10 @@ if (TARGET reflective_rapidjson_generator_tests)
|
||||||
CLANG_OPTIONS_FROM_TARGETS
|
CLANG_OPTIONS_FROM_TARGETS
|
||||||
reflective_rapidjson_generator_tests
|
reflective_rapidjson_generator_tests
|
||||||
JSON_CLASSES
|
JSON_CLASSES
|
||||||
OtherNotJsonSerializable # test specifying classes for JSON (de)serialization manually
|
OtherNotJsonSerializable # test specifying classes for JSON (de)serialization manually
|
||||||
SomeOtherClassName # specifying a class that does not exist should not cause any problems
|
SomeOtherClassName # specifying a class that does not exist should not cause any problems
|
||||||
JSON_VISIBILITY
|
JSON_VISIBILITY
|
||||||
LIB_EXPORT # not required, just to test setting visibility
|
CPP_UTILITIES_GENERIC_LIB_EXPORT # not required, just to test setting visibility
|
||||||
)
|
)
|
||||||
# cmake-format: on
|
# cmake-format: on
|
||||||
list(APPEND TEST_HEADER_FILES ${TEST_GENERATED_HEADER_FILES})
|
list(APPEND TEST_HEADER_FILES ${TEST_GENERATED_HEADER_FILES})
|
||||||
|
|
|
@ -23,7 +23,7 @@ BinarySerializationCodeGenerator::Options::Options()
|
||||||
{
|
{
|
||||||
additionalClassesArg.setRequiredValueCount(Argument::varValueCount);
|
additionalClassesArg.setRequiredValueCount(Argument::varValueCount);
|
||||||
additionalClassesArg.setValueCompletionBehavior(ValueCompletionBehavior::None);
|
additionalClassesArg.setValueCompletionBehavior(ValueCompletionBehavior::None);
|
||||||
visibilityArg.setPreDefinedCompletionValues("LIB_EXPORT");
|
visibilityArg.setPreDefinedCompletionValues("CPP_UTILITIES_GENERIC_LIB_EXPORT");
|
||||||
}
|
}
|
||||||
|
|
||||||
BinarySerializationCodeGenerator::BinarySerializationCodeGenerator(CodeFactory &factory, const Options &options)
|
BinarySerializationCodeGenerator::BinarySerializationCodeGenerator(CodeFactory &factory, const Options &options)
|
||||||
|
|
|
@ -19,7 +19,7 @@ CodeGenerator::~CodeGenerator()
|
||||||
*/
|
*/
|
||||||
void CodeGenerator::addDeclaration(clang::Decl *decl)
|
void CodeGenerator::addDeclaration(clang::Decl *decl)
|
||||||
{
|
{
|
||||||
VAR_UNUSED(decl)
|
CPP_UTILITIES_UNUSED(decl)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
@ -16,7 +16,7 @@ bool FrontendAction::hasCodeCompletionSupport() const
|
||||||
REFLECTIVE_RAPIDJSON_MAYBE_UNIQUE(clang::ASTConsumer)
|
REFLECTIVE_RAPIDJSON_MAYBE_UNIQUE(clang::ASTConsumer)
|
||||||
FrontendAction::CreateASTConsumer(clang::CompilerInstance &compilerInstance, llvm::StringRef inputFile)
|
FrontendAction::CreateASTConsumer(clang::CompilerInstance &compilerInstance, llvm::StringRef inputFile)
|
||||||
{
|
{
|
||||||
VAR_UNUSED(inputFile)
|
CPP_UTILITIES_UNUSED(inputFile)
|
||||||
|
|
||||||
// propagate compiler instance to factory
|
// propagate compiler instance to factory
|
||||||
m_factory.setCompilerInstance(&compilerInstance);
|
m_factory.setCompilerInstance(&compilerInstance);
|
||||||
|
|
|
@ -23,7 +23,7 @@ JsonSerializationCodeGenerator::Options::Options()
|
||||||
{
|
{
|
||||||
additionalClassesArg.setRequiredValueCount(Argument::varValueCount);
|
additionalClassesArg.setRequiredValueCount(Argument::varValueCount);
|
||||||
additionalClassesArg.setValueCompletionBehavior(ValueCompletionBehavior::None);
|
additionalClassesArg.setValueCompletionBehavior(ValueCompletionBehavior::None);
|
||||||
visibilityArg.setPreDefinedCompletionValues("LIB_EXPORT");
|
visibilityArg.setPreDefinedCompletionValues("CPP_UTILITIES_GENERIC_LIB_EXPORT");
|
||||||
}
|
}
|
||||||
|
|
||||||
JsonSerializationCodeGenerator::JsonSerializationCodeGenerator(CodeFactory &factory, const Options &options)
|
JsonSerializationCodeGenerator::JsonSerializationCodeGenerator(CodeFactory &factory, const Options &options)
|
||||||
|
|
|
@ -36,8 +36,7 @@ inline void assertEqualityLinewise(const Iteratable &iteratable1, const Iteratab
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!differentLines.empty()) {
|
if (!differentLines.empty()) {
|
||||||
CPPUNIT_ASSERT_EQUAL_MESSAGE(
|
CPPUNIT_ASSERT_EQUAL_MESSAGE("the following lines differ: " + CppUtilities::joinStrings(differentLines, ", "), iteratable1, iteratable2);
|
||||||
"the following lines differ: " + CppUtilities::joinStrings(differentLines, ", "), iteratable1, iteratable2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ bool Visitor::VisitDecl(clang::Decl *decl)
|
||||||
*/
|
*/
|
||||||
bool ReflectiveRapidJSON::Visitor::VisitFunctionDecl(clang::FunctionDecl *func)
|
bool ReflectiveRapidJSON::Visitor::VisitFunctionDecl(clang::FunctionDecl *func)
|
||||||
{
|
{
|
||||||
VAR_UNUSED(func)
|
CPP_UTILITIES_UNUSED(func)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ bool ReflectiveRapidJSON::Visitor::VisitFunctionDecl(clang::FunctionDecl *func)
|
||||||
*/
|
*/
|
||||||
bool ReflectiveRapidJSON::Visitor::VisitStmt(clang::Stmt *st)
|
bool ReflectiveRapidJSON::Visitor::VisitStmt(clang::Stmt *st)
|
||||||
{
|
{
|
||||||
VAR_UNUSED(st)
|
CPP_UTILITIES_UNUSED(st)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ bool ReflectiveRapidJSON::Visitor::VisitStmt(clang::Stmt *st)
|
||||||
*/
|
*/
|
||||||
bool Visitor::VisitNamespaceDecl(clang::NamespaceDecl *decl)
|
bool Visitor::VisitNamespaceDecl(clang::NamespaceDecl *decl)
|
||||||
{
|
{
|
||||||
VAR_UNUSED(decl)
|
CPP_UTILITIES_UNUSED(decl)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ bool Visitor::VisitNamespaceDecl(clang::NamespaceDecl *decl)
|
||||||
*/
|
*/
|
||||||
bool Visitor::VisitCXXRecordDecl(clang::CXXRecordDecl *decl)
|
bool Visitor::VisitCXXRecordDecl(clang::CXXRecordDecl *decl)
|
||||||
{
|
{
|
||||||
VAR_UNUSED(decl)
|
CPP_UTILITIES_UNUSED(decl)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
#define REFLECTIVE_RAPIDJSON_EXPORT
|
#define REFLECTIVE_RAPIDJSON_EXPORT
|
||||||
#define REFLECTIVE_RAPIDJSON_IMPORT
|
#define REFLECTIVE_RAPIDJSON_IMPORT
|
||||||
#else
|
#else
|
||||||
#define REFLECTIVE_RAPIDJSON_EXPORT LIB_EXPORT
|
#define REFLECTIVE_RAPIDJSON_EXPORT CPP_UTILITIES_GENERIC_LIB_EXPORT
|
||||||
#define REFLECTIVE_RAPIDJSON_IMPORT LIB_IMPORT
|
#define REFLECTIVE_RAPIDJSON_IMPORT CPP_UTILITIES_GENERIC_LIB_IMPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
Loading…
Reference in New Issue