Skip to content

Commit d8c3b3f

Browse files
committed
Don't convert CMake environment variables when using -x_noenv option
When having environment CMake variables in the form of `${....}` and using `doxygen -x_noenv` we still can get warnings like: ``` warning: argument '${EIGEN_DOXY_INTERNAL}' for option INTERNAL_DOCS is not a valid boolean value Using the default: NO! ``` whilst in this case these environment variables should not give a warning and remain in the resulting Doxyfile. These variables are normally resolved by CMake, but when creating one's own Doxyfile based on a CMake Doxyfile.in without running CMake they should not be touched and not be converted to the default value. (Found when doing some tests with the Eigen package).
1 parent 688a5ad commit d8c3b3f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/configimpl.l

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,13 +1396,14 @@ void ConfigImpl::emptyValueToDefault()
13961396

13971397
static const reg::Ex reEnvVar(R"(\$\((\a[\w.-]*)\))"); // e.g. $(HOME)
13981398
static const reg::Ex reEnvVarExt(R"(\$\((\a[\w.-]*\(\a[\w.-]*\))\))"); // e.g. $(PROGRAMFILES(X86))
1399-
static const reg::Ex reEnvVarCMake(R"(@\a\w*@)"); // CMake type replacement
1399+
static const reg::Ex reEnvVarCMake(R"(@\a\w*@)"); // CMake type replacement (@...@)
1400+
static const reg::Ex reEnvVar1CMake(R"(\${\a\w*})"); // CMake type replacement (${...})
14001401

14011402
static bool containsEnvVar(QCString &str)
14021403
{
14031404
reg::Match m;
14041405
std::string s = str.str();
1405-
return reg::search(s,m,reEnvVar) || reg::search(s,m,reEnvVarExt) || reg::search(s,m,reEnvVarCMake);
1406+
return reg::search(s,m,reEnvVar) || reg::search(s,m,reEnvVarExt) || reg::search(s,m,reEnvVarCMake) || reg::search(s,m,reEnvVar1CMake);
14061407
}
14071408

14081409
static void substEnvVarsInString(QCString &str)

0 commit comments

Comments
 (0)