remove_definitions

From Get docs
Cmake/docs/3.21/command/remove definitions


remove_definitions

Remove -D define flags added by add_definitions().

remove_definitions(-DFOO -DBAR ...)

Removes flags (added by add_definitions()) from the compiler command line for sources in the current directory and below.

© 2000–2021 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.
https://cmake.org/cmake/help/v3.21/command/remove_definitions.html