[cmake-developers] New Cmake module - Armadillo C++

creusot creusot at cs.york.ac.uk
Thu Mar 17 11:35:09 EDT 2011


Hi Alex,

Thanks for your help.
I have changed the FindArmadillo.cmake file using your comments.
The file is attached to this email.
I also modified Armadillo installation. A new ArmadilloConfig.cmake file 
is installed in ${INSTALL_DATA_DIR}/Armadillo/cmake/. It works well, 
thanks for the tips.

Clement.


On 16/03/11 19:16, Alexander Neundorf wrote:
> Hi Clement,
>
> On Wednesday 16 March 2011, creusot wrote:
>> Hi everybody,
>> I would like to propose a new cmake module for the Armadillo C++ library.
>>        http://arma.sourceforge.net/
>> This library provides fast linear algebra methods with an interface very
>> similar to octave code:
>>      colvec x = solve(A,b);
>>      colvec x = inv(trans(A)*A)*trans(A)*b ;
>> I have attached the FindArmadillo.cmake file to this email.
>> I propose myself as Module maintainer for Armadillo C++.
>> My details: Clement Creusot (creusot at cs.york.ac.uk)
>>
>> Can you tell me if I need to do other steps (in addition to sending this
>> email) ?
> Here you can find more information, please follow the links there:
> http://www.vtk.org/Wiki/CMake:Module_Maintainers
>
>> When will the new module file be available to cmake users?
> Well, the next release is 2.8.5 in 2 or 3 months or so.
>
>> Is there a clean way to provide the FindArmadillo.cmake file for people
>> installing armadillo that are not likely to update cmake anytime soon?
> Not really. You could put it in the cmake wiki or on the armadillo website.
> A good thing to do would be if armadillo would install a ArmadilloConfig.cmake
> file, which will be automatically found by find_package() even without a
> FindArmadillo.cmake
>
>> Is hard-copying the file into cmakeroot/Modules a good strategy?
> No.
>
>> Is there an other way to dynamically add a cmake module while installing
>> a new software?
> No, because this doesn't make sense.
> The purpose of a FindFoo.cmake is to find out whether Foo is installed or not,
> and iof installed, find out where it is installed. This means it must be
> available also when Foo itself is not installed.
>
>> Best regards,
>> Clement.
>
> Some comments on the file:
>
> * In order to be accepted into cmake the license of the file must be BSD or
> similar, LGPL is AFAIK not accepted.
>
> * Please use consistent upper or lower-casing of the commands. Lower-casing is
> prefered.
>
> * The
> if(WIN32)
> else()
> endif()
> for finding the library and headers doesn't seem to be necessary, you can just
> list all possible directories in one call to find_path() and find_library()
> respectively.
>
> * The additional search paths given in the not-WIN32 branch shouldn't be
> necessary, these are all standard search paths.
>
> * For checking whether it has been found successfully, please use the
> find_package_handle_standard_args() macro:
> find_package_handle_standard_args(Armadillo
>                          REQUIRED_VARS Armadillo_LIBRARY Armadillo_INCLUDE_DIR
>                          VERSION_VAR Armadillo_VERSION_STRING)
>
> This will handle the version comparison, the check whether it is required or
> not, QUIET and not QUIET automatically for you.
>
> Alex

-------------- next part --------------
A non-text attachment was scrubbed...
Name: FindArmadillo.cmake
Type: text/x-cmake
Size: 3919 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20110317/e9e22800/attachment-0002.bin>


More information about the cmake-developers mailing list