1

I have a C project with the subdirectories lib1 and lib2. lib2 defines things depending on defines in lib1. Therefore I set INPUT = lib1 lib2. I don't want to repeat the folders for INCLUDE_PATH (because in reality these are a lot of folders). I would like to reuse INPUT somehow.

The documentation of Doxygen states, that environment variables can be used with the syntax $(xxx). Therefore I tried INCLUDE_PATH = $(INPUT), but this doesn't work, because INPUT is not an environment variable.

lib1/lib1.h

#ifndef LIB1_H
#define LIB1_H

#define LIB1_DEPENDENCY

#endif LIB1_H

lib2/lib2.h

#include "lib1.h"

#ifdef LIB1_DEPENDENCY
    //! @brief LIB1_DEPENDENCY was defined
    void lib2_function(void);
#else
    //! @brief LIB1_DEPENDENCY was NOT defined
    void lib2_function(void);
#endif

I would expect that in the documentation the brief description of lib2_function() is "LIB1_DEPENDENCY was defined".

I am using doxygen 1.8.15.

HeLLoTIS
  • 73
  • 6
  • I think you should also have a look at the preprocessor settings of doxygen. Also always mention the version of doxygen used. – albert Jun 06 '19 at 08:10
  • I added the doxygen version. It is not clear to me, what you mean with the preprocessor settings. Do you mean "ENABLE_PREPROCESSING", "MACRO_EXPANSION", ..., "SKIP_FUNCTION_MACROS"? If this is the case I can add further descriptions to the question. – HeLLoTIS Jun 11 '19 at 05:25
  • I did mean those settings. Regarding the reuse of the INPUT settings in e.g. INCLUDE_PATH this is not possible. – albert Jun 11 '19 at 11:49

0 Answers0