How to get rid of policy CMP0076 warning?

User avatar
mbratch
Posts: 294
Joined: Fri Jun 11, 2021 1:51 pm

How to get rid of policy CMP0076 warning?

Postby mbratch » Thu Jul 22, 2021 1:04 pm

I am getting the familiar warning from a fresh ESP-IDF build:
CMake Warning (dev) at C:/Users/mdbra/Documents/esp-idf/components/mbedtls/CMakeLists.txt:114 (target_sources):
Policy CMP0076 is not set: target_sources() command converts relative paths
to absolute. Run "cmake --help-policy CMP0076" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.

A private source from a directory other than that of target "mbedcrypto"
has a relative path.
This warning is for project developers. Use -Wno-dev to suppress it.
I added the following line early in my project level `CMakeLists.txt`:

Code: Select all

cmake_policy(SET CMP0076 NEW)
However, the warning still persists.

Does anyone know the correct incantation to eliminate the cause of the warning?

User avatar
mbratch
Posts: 294
Joined: Fri Jun 11, 2021 1:51 pm

Re: How to get rid of policy CMP0076 warning?

Postby mbratch » Sun Jul 25, 2021 3:21 pm

Nobody knows how to get rid of this warning?


User avatar
mbratch
Posts: 294
Joined: Fri Jun 11, 2021 1:51 pm

Re: How to get rid of policy CMP0076 warning?

Postby mbratch » Sun Jul 25, 2021 6:24 pm

Great, thanks. Hadn't encountered that post after all the searching. The one I encountered said to include the policy setting to remove the warning.

Who is online

Users browsing this forum: Bing [Bot] and 73 guests