---
title: preprocessorMacros
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlcompileoptions/preprocessormacros
---

# preprocessorMacros

A list of preprocessor macros to apply when compiling the library source.

## Declaration

```swift
var preprocessorMacros: [String : NSObject]? { get set }
```

## Discussion

Discussion Define the macros as a dictionary where each key is a string, and the values can be either an NSString or NSNumber instance. The default value is nil.

## See Also

### Configuring the compiler options

- [enableLogging](metal/mtlcompileoptions/enablelogging.md)
- [mathMode](metal/mtlcompileoptions/mathmode.md)
- [mathFloatingPointFunctions](metal/mtlcompileoptions/mathfloatingpointfunctions.md)
- [preserveInvariance](metal/mtlcompileoptions/preserveinvariance.md)
- [languageVersion](metal/mtlcompileoptions/languageversion.md)
- [optimizationLevel](metal/mtlcompileoptions/optimizationlevel.md)
- [libraries](metal/mtlcompileoptions/libraries.md)
- [fastMathEnabled](metal/mtlcompileoptions/fastmathenabled.md)
