[cmake] Check for unused command line arguments using the C compiler
Summary:
We are currently checking using the c++ compiler, independently of the language used. This breaks the build for libsecp256k1 which has no c++ support.
We could switch the check depending on the project language but it's simpler (and faster) to just use the C compiler instead and assume it will be available also for the c++ one.
Test Plan:
With clang and gcc:
ninja all check
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D17281