<commit_before>FindMathematica manual
======================

FindMathematica is a CMake module that tries to find a *Mathematica* installation and provides
CMake functions for *Mathematica*'s C/C++ interface.

Installation
------------

Copy the directory `CMake/Mathematica` to the root directory of your CMake project. In the
top-level `CMakeList.txt` file add the module directory to the CMake module search path:

    set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake/Mathematica" ${CMAKE_MODULE_PATH})

Optional CMake MUnit testing support requires the installation of the Wolfram MUnit package. MUnit
is built into *Mathematica* 10. For earlier versions of *Mathematica*, a compatible MUnit package
ships with Wolfram Workbench 2.0. The JAR file `com.wolfram.eclipse.testing_2.0.126.jar` in the
`plugins` subfolder of the Workbench installation folder contains different MUnit package versions
for *Mathematica* versions 5.2 to 9.0.

To install MUnit, extract the MUnit package version appropriate for your installed *Mathematica*
version from the JAR file to a directory on the *Mathematica* `$Path` (e.g.,
`$BaseDirectory/Applications` or `$UserBaseDirectory/Applications`). Alternatively you can
copy the MUnit package to the FindMathematica module directory which is automatically prepended
to `$Path` when the *Mathematica* kernel is launched through the FindMathematica module.

If you plan on generating *Mathematica* documentation with CMake, the installation of two Wolfram
documentation build packages, which also ship with Wolfram Workbench 2.0, is required.
The JAR file `com.wolfram.eclipse.paclet.develop_2.0.138.jar` in the `plugins` subfolder of the
Workbench installation folder contains the package folders `DocumentationBuild` and `Transmogrify`.
These must be copied to a directory on the *Mathematica* `$Path`.

The `DocumentationBuild` package also requires the installation of [Apache Ant][aant]. In order for
Apache Ant to be found by CMake, the environment variable `ANT_HOME` needs to point to Apache Ant's
installation directory.

Usage
-----

If you are new to CMake, check out the [CMake tutorial][cmtut] first.

To find the newest *Mathematica* installation in a CMake listfile, run the `find_package`
command:

    find_package(Mathematica)

The FindMathematica module will look for a *Mathematica* installation in the default installation
location of the used platform. Under Windows it will also use installation locations from the
Windows Registry. Under OS X it will also query the Launch Services database.<commit_msg>revise installation section in manual<commit_after>FindMathematica manual
======================

FindMathematica is a CMake module that tries to find a *Mathematica* installation and provides
CMake functions for *Mathematica*'s C/C++ interface.

Installation
------------

Copy the directory `CMake/Mathematica` to the root directory of your CMake project. In the
top-level `CMakeList.txt` file add the module directory to the CMake module search path:

    set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake/Mathematica" ${CMAKE_MODULE_PATH})

Optional CMake MUnit testing support requires the installation of the Wolfram MUnit package. MUnit
is built into *Mathematica* 10 or later. For earlier versions of *Mathematica*, a compatible MUnit 
package ships with Wolfram Workbench 2.0. The JAR file `com.wolfram.eclipse.testing_2.0.126.jar` in
the `plugins` subdirectory of the Workbench installation folder contains different MUnit package
versions for *Mathematica* versions 5.2 to 9.0.

To install MUnit, extract the MUnit package version appropriate for your installed *Mathematica*
version from the JAR file to a directory on the *Mathematica* `$Path` (e.g.,
`$BaseDirectory/Applications` or `$UserBaseDirectory/Applications`). Alternatively you can
copy the MUnit package to the FindMathematica module directory which is automatically prepended
to `$Path` when the *Mathematica* kernel is launched through the FindMathematica module.

If you plan on generating *Mathematica* documentation with CMake, the installation of two Wolfram
documentation build packages, which also ship with Wolfram Workbench 2.0, is required.
The JAR file `com.wolfram.eclipse.paclet.develop_2.0.138.jar` in the `plugins` subdirectory of the
Workbench installation folder contains the package folders `DocumentationBuild` and `Transmogrify`.
These must be copied to a directory on the *Mathematica* `$Path`.

The `DocumentationBuild` package also requires the installation of [Apache Ant][aant]. In order for
Apache Ant to be found by CMake, the environment variable `ANT_HOME` needs to point to Apache Ant's
installation directory.

Usage
-----

If you are new to CMake, check out the [CMake tutorial][cmtut] first.

To find the newest *Mathematica* installation in a CMake listfile, run the `find_package`
command:

    find_package(Mathematica)

The FindMathematica module will look for a *Mathematica* installation in the default installation
location of the used platform. Under Windows it will also use installation locations from the
Windows Registry. Under OS X it will also query the Launch Services database.
{'fraction_non_alphanumeric': 0.0712901975978303, 'fraction_numerical': 0.0077489345215032935, 'mean_word_length': 5.2355072463768115, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5571332', 'n_tokens_mistral': 1420, 'n_tokens_neox': 1363, 'n_words': 657}