View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001959CMakeCMakepublic2005-06-21 13:522005-06-22 09:12
ReporterFilipe Sousa 
Assigned ToKen Martin 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001959: Bug in GET_TARGET_PROPERTY LOCATION
Descriptionn the this test case GET_TARGET_PROPERTY shouldn't return loc.so instead of libloc.so

PROJECT(loc)
ADD_LIBRARY(loc SHARED loc.cc)
SET_TARGET_PROPERTIES(loc PROPERTIES PREFIX "")
GET_TARGET_PROPERTY(libfile loc LOCATION)
MESSAGE(STATUS "libfile=${libfile}")

fsousa@neptuno ~/tmp/loc/build $ cmake ..
-- Check for working C compiler: gcc
-- Check for working C compiler: gcc -- works
-- Check size of void *
-- Check size of void * - done
-- Check for working CXX compiler: c++
-- Check for working CXX compiler: c++ -- works
-- libfile=/home/fsousa/tmp/loc/build/libloc.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/fsousa/tmp/loc/build
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0002534)
Filipe Sousa (reporter)
2005-06-21 13:57

I mean should return loc.so instead of libloc.so
(0002540)
Filipe Sousa (reporter)
2005-06-21 21:33

After inspecting cmMakefile::AddLibrary it seems that LOCATION property is set here, and
cmake doesn't know about PREFIX property because is set after ADD_LIBRARY.

I think the best solution is to set LOCATION property in SET_TARGET_PROPERTIES

(0002541)
Ken Martin (developer)
2005-06-22 09:12

LOCATION is a computed property that can change based on other variables. Modified cmTarget GetProperty to take that into account. Should work but haven't actually tested that case myself.

 Issue History
Date Modified Username Field Change


Copyright © 2000 - 2018 MantisBT Team