Install Options

When installing Imath from source, take note of the following CMake options:


C++ standard to compile against. Default is 14.


Use the half-to-float conversion lookup table. Default is ON for backwards compatibility. With the value of OFF, use a bit-shift conversion algorithm. Note that this setting is overriden when compiler flags enable the F16C SSE instruction set.


Use default visibility, which makes all symbols visible in compiled objects. Default is OFF, in which case only designated necessary symbols are marked for export.


Use the noexcept specifier of appropriate methods. Default is ON. With the value of OFF, the noexcept specifier is omitted, for situations in which it is not desireable.


Enables the halfFunction object to place the lookup tables on the stack rather than allocating heap memory. Default is OFF.


A string to append to the version number in the internal package name macro IMATH_PACKAGE_STRING. Default is the empty string, but can be set to, for example, “-dev” during development (e.g. “3.1.0-dev”).


Install an unversioned symbolic link (i.e. to the versioned library.


Install Imath.pc file. Default is ON.


Public namespace alias for Imath. Default is Imath.


Real namespace for Imath that will end up in compiled symbols. Default is Imath_<major>_<minor>.


Whether the namespace has been customized (so external users know). Default is NO.


String added to the end of all the versioned libraries. Default is -<major>_<minor>


Destination sub-folder of the include path for install. Default is Imath.

To enable half-to-float conversion using the F16C SSE instruction set for g++ and clang when installing Imath, add the -mf16c compiler option:

% cmake <Imath source directory> -DCMAKE_CXX_FLAGS="-mf16c"

See half-float Conversion Configuration Options for more information about the half-float conversion process.