Skip to content

Commit

Permalink
rename macro function
Browse files Browse the repository at this point in the history
  • Loading branch information
silverqx committed Jun 3, 2024
1 parent 7c12276 commit b0ba3b9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion qmake/common/common.pri
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ load(tiny_dotenv)

CONFIG *= qt c++20 strict_c++ warn_on utf8_source hide_symbols no_keywords no_include_pwd
CONFIG *= tiny_system_headers
CONFIG *= silent
#CONFIG *= silent
CONFIG -= c++11 app_bundle

# Qt defines
Expand Down
12 changes: 6 additions & 6 deletions src/orm/libraryinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ QVersionNumber LibraryInfo::version() noexcept
TINYORM_VERSION_BUGFIX);
}

#ifndef TINY_CMAKE_BOOL
/*! Convert the CMake BOOL type value passed by the the C macro to the ON/OFF QString. */
# define TINY_CMAKE_BOOL(value) TypeUtils::isCMakeTrue(TINY_STRINGIFY(value)) ? ON : OFF
#ifndef TINY_MACRO_BOOL
/*! Convert the macro BOOL type value passed by the the C macro to the ON/OFF QString. */
# define TINY_MACRO_BOOL(value) TypeUtils::isCMakeTrue(TINY_STRINGIFY(value)) ? ON : OFF
#endif

std::map<QString, QString> LibraryInfo::ormCMacrosMap()
Expand Down Expand Up @@ -113,7 +113,7 @@ std::map<QString, QString> LibraryInfo::ormCMacrosMap()
#endif
// CMake ON/OFF
#ifdef TINYORM_LTO
{sl("TINYORM_LTO"), TINY_CMAKE_BOOL(TINYORM_LTO)},
{sl("TINYORM_LTO"), TINY_MACRO_BOOL(TINYORM_LTO)},
#endif
#ifdef TINYORM_MYSQL_PING
{sl("TINYORM_MYSQL_PING"), ON},
Expand All @@ -133,7 +133,7 @@ std::map<QString, QString> LibraryInfo::ormCMacrosMap()
#endif
// CMake ON/OFF
#ifdef TINYORM_STRICT_MODE
{sl("TINYORM_STRICT_MODE"), TINY_CMAKE_BOOL(TINYORM_STRICT_MODE)},
{sl("TINYORM_STRICT_MODE"), TINY_MACRO_BOOL(TINYORM_STRICT_MODE)},
#endif
// Newline needed - QtCreator syntax highlighting bug
#ifdef TINYORM_TESTS_CODE
Expand All @@ -154,7 +154,7 @@ std::map<QString, QString> LibraryInfo::ormCMacrosMap()
// CMake ON/OFF
#ifdef TINYORM_MSVC_RUNTIME_DYNAMIC
{sl("TINYORM_MSVC_RUNTIME_DYNAMIC"),
TINY_CMAKE_BOOL(TINYORM_MSVC_RUNTIME_DYNAMIC)},
TINY_MACRO_BOOL(TINYORM_MSVC_RUNTIME_DYNAMIC)},
#endif
};
}
Expand Down
10 changes: 5 additions & 5 deletions tom/src/tom/commands/aboutcommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,9 @@ QVector<SectionItem> AboutCommand::gatherAllAboutInformation() const
using Orm::Constants::OFF;
using Orm::Constants::ON;

#ifndef TINY_CMAKE_BOOL
/*! Convert the CMake BOOL type value passed by the the C macro to the ON/OFF QString. */
# define TINY_CMAKE_BOOL(value) TypeUtils::isCMakeTrue(TINY_STRINGIFY(value)) ? ON : OFF
#ifndef TINY_MACRO_BOOL
/*! Convert the macro BOOL type value passed by the the C macro to the ON/OFF QString. */
# define TINY_MACRO_BOOL(value) TypeUtils::isCMakeTrue(TINY_STRINGIFY(value)) ? ON : OFF
#endif
#endif // TINYORM_MSVC_RUNTIME_DYNAMIC

Expand Down Expand Up @@ -333,11 +333,11 @@ QVector<SubSectionItem> AboutCommand::gatherEnvironmentInformation() const
// CMake ON/OFF
// qmake has bad support for ltcg so it's not handled in qmake (don't do it in future)
#ifdef TINYORM_LTO
{sl("Link Time Optimization"), TINY_CMAKE_BOOL(TINYORM_LTO)},
{sl("Link Time Optimization"), TINY_MACRO_BOOL(TINYORM_LTO)},
#endif
#ifdef TINYORM_MSVC_RUNTIME_DYNAMIC
{sl("MSVC Runtime dynamic"),
TINY_CMAKE_BOOL(TINYORM_MSVC_RUNTIME_DYNAMIC)},
TINY_MACRO_BOOL(TINYORM_MSVC_RUNTIME_DYNAMIC)},
#endif
// Newline needed - QtCreator syntax highlighting bug
#ifdef TINYTOM_CMAKE_MSVC_RUNTIME_LIBRARY
Expand Down

0 comments on commit b0ba3b9

Please sign in to comment.