Need a target_remove_definitions() function
This is a deficiency in the current CMake. While add_defintions() got a more modern version in target_compile_definitions, there is no such grace offered for remove_definitions().
Sadly, this is a necessary feature for working with other 3rd party libraries as they often screw up the compile definitions for the rest of your project somehow, particularly when they include each other.
For an example use case: I have a header-only library from github that I use in my project. It has a header in it that #define NOMINMAX. This definition is necessary to prevent Windows.h from screwing up everything by defining the horrific macros min() and max(), thus breaking standard C++ badly.
However, the MSVC compiler as invoked by CMake will already by default add /DNOMINMAX to the command line. This then breaks when warnings are treated as errors, stopping the build, because MSVC complains about macro redefinition.
This kind of thing happens all the time with various other definitions and a lot of my CMakeList.txts are about gluing together these anti-social open source projects. To do that effectively, I need target_remove_definitions.
Without it, I'm forced to this instead: