Skip to content
Snippets Groups Projects
Commit 0dbe4edc authored by Brad King's avatar Brad King
Browse files

BUG: ABSOLUTE option should evaluate relative paths with respect to...

BUG: ABSOLUTE option should evaluate relative paths with respect to CMAKE_CURRENT_SOURCE_DIR.  This addresses bug#2797.
parent bfa972a2
No related branches found
No related tags found
No related merge requests found
......@@ -75,6 +75,20 @@ bool cmGetFilenameComponentCommand::InitialPass(std::vector<std::string> const&
}
else if (args[2] == "ABSOLUTE")
{
// If the path given is relative evaluate it relative to the
// current source directory.
if(!cmSystemTools::FileIsFullPath(filename.c_str()))
{
std::string fname = m_Makefile->GetCurrentDirectory();
if(!fname.empty())
{
fname += "/";
fname += filename;
filename = fname;
}
}
// Collapse the path to its simplest form.
result = cmSystemTools::CollapseFullPath(filename.c_str());
}
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment