[CMake] ANN: CMake module for Mathematica

Rolf Eike Beer eike at sf-mail.de
Sun Dec 5 10:53:43 EST 2010


Am Sonntag, 5. Dezember 2010 schrieb Sascha Kratky:
> Announcing: CMake module that finds a Mathematica installation and provides
> CMake functions for Mathematica's C/C++ interface.
> 
> Features:
> * Works with Windows, Linux and Mac OS X versions of Mathematica.
> * Finds Mathematica versions from 5.2 to 8.0.
> * Finds include directories and libraries for MathLink.
> * Finds include directories and libraries for LibraryLink (Mathematica 8
> only).
> * Provides exact version information for Mathematica, MathLink and
> LibraryLink.
> * Allows for running Mathematica code during CMake configure or build time.
> * Allows for running Mathematica code as a pre-link, pre-build or
> post-build action.
> * Allows for running Mathematica code in CMake test targets.
> * Supports generating C code from MathLink template files using mprep.
> * Supports building dynamic libraries loadable with LibraryLink
> (Mathematica 8 only).
> * Supports generating stand-alone C code from Mathematica code with
> CCodeGenerator (Mathematica 8 only).
> * Provides CMake interface to Mathematica's Splice function.
> * Fully leverages CMake's cross-compiling support.
> 
> For more information see https://github.com/sakra/FindMathematica

In line 293 you do:

get_filename_component(Mathematica_CMAKE_MODULE_DIR 
"${CMAKE_CURRENT_LIST_FILE}" PATH)

You could use CMAKE_CURRENT_LIST_DIR which was introduced in CMake 2.8.3 
(which you are requiring anyway).

The _make_file_executable() macro only needs to be called for the Unix part. 
And both subversion as well as git can handle the executable bits, so I would 
vote for making the shell script just executable in the distribution and 
remove that macro.

You seem to mix tabs and spaces, the identation looks screwed up in gitweb.

What happens in _get_system_IDs on an Itanium? You only check the pointer size 
AFAICS and always assume AMD64 on 64 bit.

Do you really need Mathematica_FOUND or isn't MATHEMATICA_FOUND enough?

Greetings,

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101205/bb018cce/attachment.pgp>


More information about the CMake mailing list