google / google/autofdo

CMake warning: add_custom_command with PRE_BUILD

Open
#232 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
619
Forks
127
PR merge metrics
No merged PRs in 30d

Description

CMakeLists.txt is triggering a warning from the latest cmake built from source (3.31.1) on Ubuntu 20.04:
```
../cmake-3.31 -DENABLE_TOOL=GCOV -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED=On ../
```
prints a warning
```
CMake Warning (dev) at CMakeLists.txt:168 (add_custom_command):
The following keywords are not supported when using
add_custom_command(OUTPUT): PRE_BUILD.

Policy CMP0175 is not set: add_custom_command() rejects invalid arguments.
Run "cmake --help-policy CMP0175" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
Call Stack (most recent call first):
CMakeLists.txt:855 (build_gcov)
This warning is for project developers. Use -Wno-dev to suppress it.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.