---
title: "enableWarning(_:_:)"
framework: packagedescription
role: symbol
role_heading: Type Method
path: "packagedescription/cxxsetting/enablewarning(_:_:)"
---

# enableWarning(_:_:)

Enable a specific C++ compiler warning group.

## Declaration

```swift
static func enableWarning(_ name: String, _ condition: BuildSettingCondition? = nil) -> CXXSetting
```

## Parameters

- `name`: The name of the warning group to enable.
- `condition`: A condition that restricts the application of the build setting.

## Discussion

Discussion Use this setting to enable a specific warning group. This is equivalent to passing -W followed by the group name to the C++ compiler. note: First available in PackageDescription 6.2.
