Am Mittwoch, 31. Juli 2019, 12:19:48 CEST schrieb Braden McDaniel: > I was tempted to go ahead and file a bug on this; but it seems so basic > that I figure I must be missing something. > > Per the documentation for find_program: > > If NO_DEFAULT_PATH is not specified, the search process is as > follows: > ⋮ > 5. Search the standard system environment variables. This can be > skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument. > * PATH > That indicates to me that for "find_program(PROG_VAR NAME foo)", CMake > ought to find "foo" if "foo" is in the PATH. That doesn't seem to be > the case, though. A concrete example: > > cmake_minimum_required(VERSION 3.0) > cmake_policy(SET CMP0048 NEW) > project("hello" VERSION 0.1.0 LANGUAGES C) > find_program(GETTEXT_MSGMERGE_EXECUTABLE NAME msgmerge)
The find_program() is searching something like "/usr/bin/NAME". "NAME" should be a placeholder. What you had in mind was probably the second form find_program(GETTEXT_MSGMERGE_EXECUTABLE NAMES msgmerge) Mark the string "NAMES". Kornel
signature.asc
Description: This is a digitally signed message part.
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake