CMake Deprecation Warning :" message(DEPRECATION “The CMAKE_FORCE_C_COMPILER macro is deprecated
NickName:udayakarthik g Ask DateTime:2021-02-23T16:39:42

CMake Deprecation Warning :" message(DEPRECATION “The CMAKE_FORCE_C_COMPILER macro is deprecated

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

More about “CMake Deprecation Warning :" message(DEPRECATION “The CMAKE_FORCE_C_COMPILER macro is deprecated” related questions

Disable CMake deprecation warning

I'm using a third-party project with add_subdirectory, this other project declares cmake_minimum_required(VERSION 2.8.11), and with recent CMake I get: CMake Deprecation Warning at External/libmsym/

Show Detail

Yotta build results in CMake Deprecation Warning, cmake-policies OLD behaviours

I am trying to build the code that is already made as examples for the Micro:bit using the recommended yotta build but after following every step I am getting this error: yotta build info:

Show Detail

CMake Deprecation Warning :" message(DEPRECATION “The CMAKE_FORCE_C_COMPILER macro is deprecated

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....

Show Detail

CMake Deprecation Warning :" message(DEPRECATION “The CMAKE_FORCE_C_COMPILER macro is deprecated

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....

Show Detail

DEPRECATION WARNING:

I am trying to following the answer to this question in an attempt to copy to clipboard however all solutions provided in the answer seem to have failed me. On macOS, I have successfully used pyper...

Show Detail

Deprecation warning in scala

I have defined a function named ti but after compilation it shows a deprecation warning. I did the same in Eclipse. The code works fine but it shows a warning. scala> def ti(chars:List[Char],a...

Show Detail

Tkinter deprecation warning

DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning. I tried updating

Show Detail

Tracing a deprecation warning

I am receiving this warning in my program, I have recently updated to Node 10 and I'm trying to figure out the source of the deprecation warning: [DEP0079] DeprecationWarning: Custom inspection fu...

Show Detail

add line in cmake to edit Makefile definition

In my cmake file, I am specifying add_definitions ( -DBOOST_SIGNALS_NO_DEPRECATION_WARNING ). However, I am still seeing the warning warning: #warning "Boost.Signals is no longer being maintained a...

Show Detail

Example for deprecation warning

I get the following deprecation warning: DEPRECATION WARNING: The behavior of `changed?` inside of after callbacks will be changing in the next version of Rails. The new return value will refle...

Show Detail