Commit 91f36271 authored by Tobias Hunger's avatar Tobias Hunger

CMake: Check build dir first, then source dir in server mode

The build dir might be contained in the source directory, but not
the other way around. So this should be more reliable.

Change-Id: I2459b249fcc1002aa7f7787231b5699444a4c6bd
Reviewed-by: Tim Jenssen's avatarTim Jenssen <tim.jenssen@qt.io>
parent bcad4a1b
......@@ -294,10 +294,10 @@ void ServerModeReader::generateProjectTree(CMakeProjectNode *root,
const FileName path = fn->filePath();
if (path.fileName().compare("CMakeLists.txt", HostOsInfo::fileNameCaseSensitivity()) == 0)
cmakeLists.append(fn);
else if (path.isChildOf(m_parameters.sourceDirectory))
cmakeFilesSource.append(fn);
else if (path.isChildOf(m_parameters.buildDirectory))
cmakeFilesBuild.append(fn);
else if (path.isChildOf(m_parameters.sourceDirectory))
cmakeFilesSource.append(fn);
else
cmakeFilesOther.append(fn);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment