Browse Source

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.
pull/381/head
Brad King 4 months ago
parent
commit
5805461074
  1. 6
      Source/cmSystemTools.cxx

6
Source/cmSystemTools.cxx

@ -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;

Loading…
Cancel
Save