Doxygen не отображает макросы в модуле
Написал следующий код:
/*****************************************************************//**
* @file main.cpp
* @brief main file of project
*
* @author bloody
* @date March 2023
*********************************************************************/
#include <iostream>
using namespace std;
#pragma region core_arch
/**
* @defgroup architecture_of_cpu
* @brief In this group keeps macros which needs for detect architecture of cpu
*/
///@{
#if !defined(BMODULESNET_ARCH64) && !defined(BMODULESNET_ARCH32)
#if defined(__x86_64) || defined(__x86_64__) || defined(__amd64__) || defined(__amd64) || defined(_M_X64)
/**
* @brief If architecture of cpu is x64, this macro will define
* @ingroup architecture_of_cpu
*/
#define BMODULESNET_ARCH64
/**
* @brief Keeps architecture of cpu.
*
* @details If your architecture is x64, this macro will equal to 64.
* If your architecture is x86, this macro will equal to 32.
*
* @ingroup architecture_of_cpu
*/
#define BMODULESNET_ARCH 64
#elif defined(i386) || defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) || defined(__i386) || defined(_M_IX86) || defined(_X86_) || defined(__THW_INTEL__) || defined(__I86__) || defined(__INTEL__)
/**
* @brief If architecture of cpu is x86, this macro will define
* @ingroup architecture_of_cpu
*/
#define BMODULESNET_ARCH32
/**
* @brief Keeps architecture of cpu.
*
* @details If your architecture is x64, this macro will equal to 64.
* If your architecture is x86, this macro will equal to 32.
*
* @ingroup architecture_of_cpu
*/
#define BMODULESNET_ARCH 32
#else
#error BModulesNetwork cannot detect the architecture of cpu
#endif
#endif // !BMODULESNET_ARCH64 && !BMODULESNET_ARCH32
///@}
#pragma endregion
int main()
{
return 1;
}
Но когда я создаю документацию с помощью doxygen, я вижу это:
Хотя по идее в модуле должны быть ещё и макросы (В моём случае BMODULESNET_ARCH64 и BMODULESNET_ARCH 64). Если добавить определение макросов в начало, где объявляется модуль, то всё становится нормально:
/*****************************************************************//**
* @file main.cpp
* @brief main file of project
*
* @author bloody
* @date March 2023
*********************************************************************/
#include <iostream>
using namespace std;
#pragma region core_arch
/**
* @defgroup architecture_of_cpu
* @brief In this group keeps macros which needs for detect architecture of cpu
*/
///@{
/**
* @brief If architecture of cpu is x64, this macro will defined
* @ingroup architecture_of_cpu
*/
#define BMODULESNET_ARCH64
/**
* @brief Keeps architecture of your cpu.
*
* @details If your architecture is x64, this macro will equal to 64.
* If your architecture is x86, this macro will equal to 32.
*
* @ingroup architecture_of_cpu
*/
#define BMODULESNET_ARCH 64
#if !defined(BMODULESNET_ARCH64) && !defined(BMODULESNET_ARCH32)
#if defined(__x86_64) || defined(__x86_64__) || defined(__amd64__) || defined(__amd64) || defined(_M_X64)
/**
* @brief If architecture of cpu is x64, this macro will defined
* @ingroup architecture_of_cpu
*/
#define BMODULESNET_ARCH64
/**
* @brief Keeps architecture of your cpu.
*
* @details If your architecture is x64, this macro will equal to 64.
* If your architecture is x86, this macro will equal to 32.
*
* @ingroup architecture_of_cpu
*/
#define BMODULESNET_ARCH 64
#elif defined(i386) || defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) || defined(__i386) || defined(_M_IX86) || defined(_X86_) || defined(__THW_INTEL__) || defined(__I86__) || defined(__INTEL__)
/**
* @brief If architecture of cpu is x86, this macro will defined
* @ingroup architecture_of_cpu
*/
#define BMODULESNET_ARCH32
/**
* @brief Keeps architecture of your cpu.
*
* @details If your architecture is x64, this macro will equal to 64.
* If your architecture is x86, this macro will equal to 32.
*
* @ingroup architecture_of_cpu
*/
#define BMODULESNET_ARCH 32
#else
#error BModulesNetwork cannot detect the architecture of your cpu
#endif
#endif // !BMODULESNET_ARCH64 && !BMODULESNET_ARCH32
///@}
#pragma endregion
int main()
{
return 1;
}
Но в таком случае смысла от этих макросов 0. Как с этим бороться?
Источник: Stack Overflow на русском