cmake -P: no warnings/errors on unused command line arguments
> cat script.cmake
message("Variable A: ${A}")
> cmake -DA=42 this-is-junk -P script.cmake this-is-junk
Variable A: 42
> echo $?
0
It would be nice to have at least warning in this case.
Edited by Brad King