llvm icon indicating copy to clipboard operation
llvm copied to clipboard

CMake 3.11 emits "Deprecation Warning at CMakeLists.txt:20" when configuring the project

Open s3rvac opened this issue 7 years ago • 0 comments

When using CMake 3.11, the cmake command emits a deprecation warning.

Steps to reproduce

  • Ensure that you have CMake 3.11 installed in your system.
  • Run the following commands:
git clone https://github.com/avast-tl/llvm.git
mkdir -p llvm/build && cd llvm/build
cmake ..

Output

-- No build type selected, default to Debug
CMake Deprecation Warning at CMakeLists.txt:20 (cmake_policy):
  The OLD behavior for policy CMP0051 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.

-- The C compiler identification is GNU 8.1.0
-- The CXX compiler identification is GNU 8.1.0
...

Expected output

The same as when using CMake 3.10:

-- No build type selected, default to Debug
-- The C compiler identification is GNU 8.1.0
-- The CXX compiler identification is GNU 8.1.0
...

We should fix the build system so no warning is emitted as it only clutters the output.

s3rvac avatar May 08 '18 12:05 s3rvac