mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Allow directory names containing '=' and warn if necessary (#12934)
The approach taken by commit 8704525f (Reject directory names containing
'=', 2011-01-14) was perhaps too heavy-handed for avoiding the obscure
cases when '=' in the path fails due to limitations of Make syntax.
Only two CMake tests:
LinkDirectory
OutOfSource
fail when the path contains '=' and they cover obscure cases. Instead
of rejecting such paths outright just warn when the problem may occur.
This commit is contained in:
@@ -561,6 +561,21 @@ cmLocalUnixMakefileGenerator3
|
||||
space = " ";
|
||||
}
|
||||
|
||||
// Warn about paths not supported by Make tools.
|
||||
std::string::size_type pos = tgt.find_first_of("=");
|
||||
if(pos != std::string::npos)
|
||||
{
|
||||
cmOStringStream m;
|
||||
m <<
|
||||
"Make rule for\n"
|
||||
" " << tgt << "\n"
|
||||
"has '=' on left hand side. "
|
||||
"The make tool may not support this.";
|
||||
cmListFileBacktrace bt;
|
||||
this->GlobalGenerator->GetCMakeInstance()
|
||||
->IssueMessage(cmake::WARNING, m.str(), bt);
|
||||
}
|
||||
|
||||
// Mark the rule as symbolic if requested.
|
||||
if(symbolic)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user