We are using CMake 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:
# Change Compiler to RH850
set(CMAKE_C_COMPILER “${COMPILER_PATH}/ccv850.exe”)
set(CMAKE_CXX_COMPILER “${COMPILER_PATH}/cxv850.exe”)
#TODO set dependency files (.d) to the correct location for compiler id check and remove FORCE’s
CMAKE_FORCE_C_COMPILER("${COMPILER_PATH}/ccv850.exe" “ARM”)
CMAKE_FORCE_CXX_COMPILER("${COMPILER_PATH}/cxv850.exe" “ARM”)
May I know how to fix this warning instead of suppress it.
Copyright Notice:Content Author:「udayakarthik g」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/66329704/cmake-deprecation-warning-messagedeprecation-the-cmake-force-c-compiler-mac