MCPcopy Create free account
hub / github.com/Kitware/CMake / FilesSameSolution

Function FilesSameSolution

Source/cmCallVisualStudioMacro.cxx:308–322  ·  view source on GitHub ↗

Do the two file names refer to the same Visual Studio solution? Or are we perhaps looking for any and all solutions?

Source from the content-addressed store, hash-verified

306//! Do the two file names refer to the same Visual Studio solution? Or are
307//! we perhaps looking for any and all solutions?
308bool FilesSameSolution(std::string const& slnFile, std::string const& slnName)
309{
310 if (slnFile == "ALL"_s || slnName == "ALL"_s) {
311 return true;
312 }
313
314 // Otherwise, make lowercase local copies, convert to Unix slashes, and
315 // see if the resulting strings are the same:
316 std::string s1 = cmSystemTools::LowerCase(slnFile);
317 std::string s2 = cmSystemTools::LowerCase(slnName);
318 cmSystemTools::ConvertToUnixSlashes(s1);
319 cmSystemTools::ConvertToUnixSlashes(s2);
320
321 return s1 == s2;
322}
323
324//! Find instances of Visual Studio with the given solution file
325//! open. Pass "ALL" for slnFile to gather all running instances

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…