From 5805461074b2c623026b0f4d4814d674d66385ad Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 7 Apr 2025 19:09:59 -0400 Subject: 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. --- Source/cmSystemTools.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 248a8a0..a8691f3 100644 --- a/Source/cmSystemTools.cxx +++ b/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; -- cgit v0.12