On 01/24/2012 05:50 AM, Alan W. Irwin wrote:
> The documentation you get from
> 
> cmake --help-full
> 
> refers to the IMPORTED_LOCATION property as one of the more important
> ones set for imported targets.  I have to agree that location is the
> most important property for imported targets, but the name appears to
> be wrong for the documentation of this property!
> 
> After screwing around for a while trying to use the above
> property for my imported targets, I discovered (by guessing) that the
> name of a property that actually does give the location information is
> IMPORT_LOCATION, not IMPORTED_LOCATION.  For what it is worth,
> IMPORT_LOCATION works for an imported library, and I haven't tried
> this on imported executables. (By the way, LOCATION works as well, but
> that appears from the documentation to be a left-over from CMake 2.4
> which is why I tried to get IMPORTED_LOCATION to work and when that
> failed, switched to the currently undocumentated IMPORT_LOCATION.)
> 
> I find IMPORTED_LOCATION is mentioned in the following
> places in the cmake-2.8.6 source tree:
> 
> software@raven> find cmake-2.8.6 -print0 -type f \
> |xargs -0 grep -l IMPORTED_LOCATION
> cmake-2.8.6/ChangeLog.txt
> cmake-2.8.6/Modules/FindQt4.cmake
> cmake-2.8.6/Tests/ExportImport/Import/A/CMakeLists.txt
> cmake-2.8.6/Tests/SimpleInstall/CMakeLists.txt
> cmake-2.8.6/Tests/SimpleInstallS2/CMakeLists.txt
> cmake-2.8.6/Source/cmTarget.cxx
> cmake-2.8.6/Source/cmAddExecutableCommand.h
> cmake-2.8.6/Source/cmAddLibraryCommand.h
> cmake-2.8.6/Source/cmExportBuildFileGenerator.cxx
> cmake-2.8.6/Source/cmExportInstallFileGenerator.cxx
> 
> A similar search for IMPORT_LOCATION found nothing at all!
> 
> However, I spot-checked cmake-2.8.6/Source/cmTarget.cxx, and all those
> mentions of IMPORTED_LOCATION appear to be documentation strings
> rather than executable code, and I was unable to find why
> IMPORTED_LOCATION does not work for me while IMPORT_LOCATION does. So
> this needs someone who is familiar with the CMake code to figure out
> what the actual problem is here, and to decide whether a fix to the
> documentation strings is all that is required or whether some deeper
> change needs to be made.
> 
> Alan

IMPORTED_LOCATION works just fine for me. Also IMPORT_LOCATION, as you
call it, is not referenced once in the whole CMake source, while
IMPORTED_LOCATION is, and not only as a documentation string as you
claim. Try

$ git grep '"IMPORTED_LOCATION"'

So it must be something else you're doing wrong.

Michael


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to