mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 19:30:13 -06:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user