[cmake-developers] [review] add_jar (UseJava) uses cmake_parse_arguments

Matthew Woehlke matthew.woehlke at kitware.com
Tue Mar 26 13:35:57 EDT 2013


On 2013-03-26 13:05, Rolf Eike Beer wrote:
> Brad King wrote:
>> @@ -190,6 +198,8 @@
>>   # (To distribute this file outside of CMake, substitute the full
>>   #  License text for the above reference.)
>>
>> +include(CMakeParseArguments)
>> +
>>   function (__java_copy_file src dest comment)
>>       add_custom_command(
>>           OUTPUT  ${dest}
>
> This should probably be
> include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake) to avoid issues
> with peoples having copies of that module lying around somewhere like we do it
> for FPHSA.

...or 'include("${CMAKE_ROOT}/Modules/CMakeParseArguments.cmake")'?

*Most* of the find modules appear to use CMAKE_CURRENT_LIST_DIR, but 
there are some (not necessarily find-package) modules that use 
CMAKE_ROOT, and some (mostly non-find) that rely on CMAKE_MODULE_PATH.

Which is best?

-- 
Matthew




More information about the cmake-developers mailing list