Let CMake not detect C++ compiler
Detecting C and C++ toolchains is the default behavior for CMake. To disable this behavior, you'll need to manually enable the language. If it's project wide, you can explicitly tag the project as 'C' by using project(projectName C)
. This information is in the CMake documentation.
It is better to use LANGUAGES C That also combines with the more common use
project(projectName VERSION 1.0 LANGUAGES C)