llvm
llvm copied to clipboard
CMake 3.11 emits "Deprecation Warning at CMakeLists.txt:20" when configuring the project
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.