Hello Sir/Madam,
We are using Cmake compiler version 3.12.0. I am using the below cmake script for compilation. While I am compiling the code I got a warning like " message(DEPRECATION “The CMAKE_FORCE_C_COMPILER macro is deprecated. " “Instead, just set CMAKE_C_COMPILER and allow CMAKE to identify the compiler.”)” .

May I know how to fix this issue. we are using Rh850 based compiler and windows10 machine. Let me know if any other information is required from my side.

Cmake Script cmd:

Change Compiler to RH850


#TODO set dependency files (.d) to the correct location for compiler id check and remove FORCE’s

You should use a toolchain file or pass -DCMAKE_${LANG}_COMPILER=$path on the command line. Projects should not set CMAKE_${LANG}_COMPILER} themselves.

This Discourse thread is related.

How to avoid cmakeforce compliler .

Without more information, I would just remove any usage of the macro and add documentation about how to set the compiler to the build instructions.