Hi, Brad,<br><br>Yes I think the second call was using the correct target...<br><br>sorry I cant be sure or provide a test example, it was quite some time ago...<br><br>I've been a bit busy implementing some cmake script for automated dependencies detection and propagation in a chain of project depending on each other...<br>
<br>I have a question related to that but I ll post it in a new thread...<br><br>Thanks anyway,<br><br>--<br>Alex<br><br><br><div class="gmail_quote">2009/3/16 Brad King <span dir="ltr"><<a href="mailto:brad.king@kitware.com">brad.king@kitware.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">Asmodehn Shade wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am currently converting my old cmake 2.4 scripts to cmake 2.6.3, as I am enjoying the new possibilities offered by the export / import system<br>
I previously implemented my self a little dirty workaround this limitation... so I am pretty happy to see this coming along ;-)<br>
</blockquote>
<br></div>
Thanks, I'm glad you like it.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
In my main script I call a few macros :<br>
<br>
import(project_export.cmake)<br>
inspect(project_target)<br>
<br>
My macros are defined as this :<br>
<br>
macro ( import external_project_export )<br>
include(${external_project_export})<br>
# I assume I know external_target is defined in ${external_project_export}<br>
get_target_properties(external_target_location ${external_target} LOCATION)<br>
###OK WORKING<br>
endmacro ( import external_project )<br>
<br>
macro ( inspect target )<br>
get_target_properties(external_target_location_test ${target} LOCATION)<br>
###NOT FOUND<br>
macro ( inspect target )<br>
<br>
In the second macro call, all the properties I tried to get ( LOCATION, IMPORTED_LOCATION, IMPORTED_LOCATION_DEBUG, etc ) all return NOT_FOUND<br>
Yes I even tried to re-include the file desperately, but it tells me the target is already defined, as it should be...<br>
So it seems the target lost its properties between the 2 macro calls ??<br>
</blockquote>
<br></div>
Are you sure the second call is using the correct target? Use message() to<br>
print the name of the target in both cases.<br><font color="#888888">
<br>
-Brad<br>
</font></blockquote></div><br>