View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011583CMakeModulespublic2010-12-08 11:292016-06-10 14:31
ReporterPierre Ossman 
Assigned ToBill Hoffman 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionFixed in Version 
Summary0011583: No simple function to find "tools" as opposed to programs
DescriptionAutoconf separates the concept of "tools" and "programs" in the macros AC_PROG_PATH and AC_TOOL_PATH (and variants). The difference only matters when you cross-compile, but when you do that distinction is crucial.

CMake unfortunately doesn't expose such a distinction, even though it uses it internally. The attached patch puts this in a generic function called find_tool() and changes the current internal users to this (just binutils really).

This also fixes a buggy pkg-config implementation as that really is a "tool" and not a "program". This makes it possible to use pkg-config with cross-compiler setups, something that wasn't previously possible (not without hacks at least).
TagsNo tags attached.
Attached Filespatch file icon find_tool.patch [^] (4,352 bytes) 2010-12-08 11:29 [Show Content]

 Relationships
related to 0008034closedAlex Neundorf In cross compiling mode FIND_PROGRAM() doesn't use CMAKE_PROGRAM_SUFFIX of the target platform 
child of 0014539closedKitware Robot Multiple output configurations 

  Notes
(0023797)
Alex Neundorf (developer)
2010-12-08 11:46

This is related to 0008034.

Alex
(0023800)
Pierre Ossman (reporter)
2010-12-08 12:21

I'm not sure what's going on on bug 8034, but it seems to be something else. The reporter there expects find_program() to find an executable for the target system. That is of course entirely wrong as find_program() is for stuff you want to run, and you can't run those binaries. The same thing applies for find_tool(), i.e. you want something you are able to execute.

(the difference between find_program() and find_tool() is what the program outputs, not what arch/system the executable is compiled for)
(0023801)
Pierre Ossman (reporter)
2010-12-08 12:26

Sorry, didn't read the entire thread. Not really used to Mantis. :/

It is slightly related, but will probably have different solutions. All the foo-config variants are not very cross-compile friendly, so most projects have deprecated them in favour of pkg-config. It could be solved in their case if they have a i686-pc-mingw32-kde4-config that is executable for Linux, but gives information for mingw. In that case my function would help. There is still the question who would create that program though?
(0041769)
Kitware Robot (administrator)
2016-06-10 14:28

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2010-12-08 11:29 Pierre Ossman New Issue
2010-12-08 11:29 Pierre Ossman File Added: find_tool.patch
2010-12-08 11:46 Alex Neundorf Note Added: 0023797
2010-12-08 12:21 Pierre Ossman Note Added: 0023800
2010-12-08 12:26 Pierre Ossman Note Added: 0023801
2010-12-15 12:25 David Cole Relationship added related to 0008034
2010-12-15 12:25 David Cole Assigned To => Bill Hoffman
2010-12-15 12:25 David Cole Status new => assigned
2013-11-02 10:35 Stephen Kelly Relationship added child of 0014539
2016-06-10 14:28 Kitware Robot Note Added: 0041769
2016-06-10 14:28 Kitware Robot Status assigned => resolved
2016-06-10 14:28 Kitware Robot Resolution open => moved
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team