EH WRONGLand-mines, mines, cluster bombs and other types of distributed types of weapons have been killing friendlies and non combatants for a while. We also currently have no weapons system that, without any targeting, will distinguish between friend or foe with no input. What some are asking for is indiscriminately fired self propelled self guided mines that will never target a friendly.
Every SAM missile launch system the US military has including shoulder fired has IFF.
CIWS has IFF. Every single US military fighter craft has IFF built into its radar system which is linked to fire control.
Every US Naval Ship has IFF in its radar system tied into fire control. I know I worked on them!
I was US Naval Nuclear ET/RO - That Electronics Tech / Reactor Operator
In general we try to keep track of troops and avoid dropping cluster bombs on them.
We also try to let our troops know where mine fields are.
We are also developing smart bombs and mine that can detect friendly ID for personnel. Even some re programmable pass code system and remote detonation so they can get rid of mines when done with them or remotely deactivate them.
In general most countries these days try to avoid killing their own troops. Very few other than a few middle eastern countries try to kill their own troops.