Brad King wrote:

> On 11/6/2011 7:00 PM, Stephen Kelly wrote:
>> include(${CMAKE_CURRENT_LIST_DIR}/GrantleeTargets.cmake)
> 
> It is up to the author of the config file to block this correctly
> against multiple inclusion, e.g.
> 
>   if(NOT Grantlee_TARGETS_INCLUDED)
>     set(Grantlee_TARGETS_INCLUDED 1)
>     include(${CMAKE_CURRENT_LIST_DIR}/GrantleeTargets.cmake)
>   endif()

Ok, thanks. Seems like an important thing to document. Is there any page 
showing how to use config files and targets files? I only found out how to 
use them by talking to Alex :).

> 
>> if (NOT TARGET grantlee_templates)
>>    ADD_LIBRARY(grantlee_templates SHARED IMPORTED)
>> endif()
> 
> This would hide cases of accidentally conflicting target names.
> 

I don't understand. You mean if someone called install(EXPORTS) with the 
wrong target? 

Thanks,

Steve.




--

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