cmSystemTools: Simplify call to FindProgram for our own executable

Remove the unnecessary `FindProgramPath` wrapper.  Call the KWSys
`FindProgram` directly, without our CMake-specific wrapper, since
we follow-up with a `ToNormalizedPathOnDisk` anyway.
This commit is contained in:
Brad King
2025-04-07 19:09:59 -04:00
parent db0e2574cb
commit 5805461074

View File

@@ -3075,11 +3075,7 @@ std::string FindOwnExecutable(char const* argv0)
}
}
#else
std::string errorMsg;
std::string exe;
if (!cmSystemTools::FindProgramPath(argv0, exe, errorMsg)) {
// ???
}
std::string exe = cmsys::SystemTools::FindProgram(argv0);
#endif
exe = cmSystemTools::ToNormalizedPathOnDisk(std::move(exe));
return exe;