diff --git a/generator/CMakeLists.txt b/generator/CMakeLists.txt index e043df2..2360ce2 100644 --- a/generator/CMakeLists.txt +++ b/generator/CMakeLists.txt @@ -81,10 +81,10 @@ if (TARGET reflective_rapidjson_generator_tests) CLANG_OPTIONS_FROM_TARGETS reflective_rapidjson_generator_tests JSON_CLASSES - OtherNotJsonSerializable # test specifying classes for JSON (de)serialization manually - SomeOtherClassName # specifying a class that does not exist should not cause any problems + OtherNotJsonSerializable # test specifying classes for JSON (de)serialization manually + SomeOtherClassName # specifying a class that does not exist should not cause any problems 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 list(APPEND TEST_HEADER_FILES ${TEST_GENERATED_HEADER_FILES}) diff --git a/generator/binaryserializationcodegenerator.cpp b/generator/binaryserializationcodegenerator.cpp index 8c4d40c..485b324 100644 --- a/generator/binaryserializationcodegenerator.cpp +++ b/generator/binaryserializationcodegenerator.cpp @@ -23,7 +23,7 @@ BinarySerializationCodeGenerator::Options::Options() { additionalClassesArg.setRequiredValueCount(Argument::varValueCount); additionalClassesArg.setValueCompletionBehavior(ValueCompletionBehavior::None); - visibilityArg.setPreDefinedCompletionValues("LIB_EXPORT"); + visibilityArg.setPreDefinedCompletionValues("CPP_UTILITIES_GENERIC_LIB_EXPORT"); } BinarySerializationCodeGenerator::BinarySerializationCodeGenerator(CodeFactory &factory, const Options &options) diff --git a/generator/codegenerator.cpp b/generator/codegenerator.cpp index b532f5d..0694ae6 100644 --- a/generator/codegenerator.cpp +++ b/generator/codegenerator.cpp @@ -19,7 +19,7 @@ CodeGenerator::~CodeGenerator() */ void CodeGenerator::addDeclaration(clang::Decl *decl) { - VAR_UNUSED(decl) + CPP_UTILITIES_UNUSED(decl) } /*! diff --git a/generator/frontendaction.cpp b/generator/frontendaction.cpp index b77f148..74b204a 100644 --- a/generator/frontendaction.cpp +++ b/generator/frontendaction.cpp @@ -16,7 +16,7 @@ bool FrontendAction::hasCodeCompletionSupport() const REFLECTIVE_RAPIDJSON_MAYBE_UNIQUE(clang::ASTConsumer) FrontendAction::CreateASTConsumer(clang::CompilerInstance &compilerInstance, llvm::StringRef inputFile) { - VAR_UNUSED(inputFile) + CPP_UTILITIES_UNUSED(inputFile) // propagate compiler instance to factory m_factory.setCompilerInstance(&compilerInstance); diff --git a/generator/jsonserializationcodegenerator.cpp b/generator/jsonserializationcodegenerator.cpp index 268c002..ad39ddf 100644 --- a/generator/jsonserializationcodegenerator.cpp +++ b/generator/jsonserializationcodegenerator.cpp @@ -23,7 +23,7 @@ JsonSerializationCodeGenerator::Options::Options() { additionalClassesArg.setRequiredValueCount(Argument::varValueCount); additionalClassesArg.setValueCompletionBehavior(ValueCompletionBehavior::None); - visibilityArg.setPreDefinedCompletionValues("LIB_EXPORT"); + visibilityArg.setPreDefinedCompletionValues("CPP_UTILITIES_GENERIC_LIB_EXPORT"); } JsonSerializationCodeGenerator::JsonSerializationCodeGenerator(CodeFactory &factory, const Options &options) diff --git a/generator/tests/helper.h b/generator/tests/helper.h index 5b30714..6802307 100644 --- a/generator/tests/helper.h +++ b/generator/tests/helper.h @@ -36,8 +36,7 @@ inline void assertEqualityLinewise(const Iteratable &iteratable1, const Iteratab } } if (!differentLines.empty()) { - CPPUNIT_ASSERT_EQUAL_MESSAGE( - "the following lines differ: " + CppUtilities::joinStrings(differentLines, ", "), iteratable1, iteratable2); + CPPUNIT_ASSERT_EQUAL_MESSAGE("the following lines differ: " + CppUtilities::joinStrings(differentLines, ", "), iteratable1, iteratable2); } } diff --git a/generator/visitor.cpp b/generator/visitor.cpp index b144ecf..8789905 100644 --- a/generator/visitor.cpp +++ b/generator/visitor.cpp @@ -34,7 +34,7 @@ bool Visitor::VisitDecl(clang::Decl *decl) */ bool ReflectiveRapidJSON::Visitor::VisitFunctionDecl(clang::FunctionDecl *func) { - VAR_UNUSED(func) + CPP_UTILITIES_UNUSED(func) return true; } @@ -43,7 +43,7 @@ bool ReflectiveRapidJSON::Visitor::VisitFunctionDecl(clang::FunctionDecl *func) */ bool ReflectiveRapidJSON::Visitor::VisitStmt(clang::Stmt *st) { - VAR_UNUSED(st) + CPP_UTILITIES_UNUSED(st) return true; } @@ -52,7 +52,7 @@ bool ReflectiveRapidJSON::Visitor::VisitStmt(clang::Stmt *st) */ bool Visitor::VisitNamespaceDecl(clang::NamespaceDecl *decl) { - VAR_UNUSED(decl) + CPP_UTILITIES_UNUSED(decl) return true; } @@ -61,7 +61,7 @@ bool Visitor::VisitNamespaceDecl(clang::NamespaceDecl *decl) */ bool Visitor::VisitCXXRecordDecl(clang::CXXRecordDecl *decl) { - VAR_UNUSED(decl) + CPP_UTILITIES_UNUSED(decl) return true; } diff --git a/lib/global.h b/lib/global.h index 8ce1e5f..7843bef 100644 --- a/lib/global.h +++ b/lib/global.h @@ -10,8 +10,8 @@ #define REFLECTIVE_RAPIDJSON_EXPORT #define REFLECTIVE_RAPIDJSON_IMPORT #else -#define REFLECTIVE_RAPIDJSON_EXPORT LIB_EXPORT -#define REFLECTIVE_RAPIDJSON_IMPORT LIB_IMPORT +#define REFLECTIVE_RAPIDJSON_EXPORT CPP_UTILITIES_GENERIC_LIB_EXPORT +#define REFLECTIVE_RAPIDJSON_IMPORT CPP_UTILITIES_GENERIC_LIB_IMPORT #endif /*!