Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't convert CMake environment variables when using -x_noenv option #11287

Merged
merged 1 commit into from
Dec 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/configimpl.l
Original file line number Diff line number Diff line change
Expand Up @@ -1396,13 +1396,14 @@ void ConfigImpl::emptyValueToDefault()

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

static bool containsEnvVar(QCString &str)
{
reg::Match m;
std::string s = str.str();
return reg::search(s,m,reEnvVar) || reg::search(s,m,reEnvVarExt) || reg::search(s,m,reEnvVarCMake);
return reg::search(s,m,reEnvVar) || reg::search(s,m,reEnvVarExt) || reg::search(s,m,reEnvVarCMake) || reg::search(s,m,reEnvVar1CMake);
}

static void substEnvVarsInString(QCString &str)
Expand Down
Loading