Pradeau Christophe created AVRO-3114:
----------------------------------------
Summary: Compilation broken on cmake < 3.0
Key: AVRO-3114
URL: https://issues.apache.org/jira/browse/AVRO-3114
Project: Apache Avro
Issue Type: Bug
Components: build, c++
Affects Versions: 1.10.2, 1.9.0
Reporter: Pradeau Christophe
On cmake < 3.0 cmake raise the error :
{code:java}
CMake Error at CMakeLists.txt:23 (cmake_policy):
Policy "CMP0042" is not known to this version of CMake.
{code}
This regression was introduced by [https://github.com/apache/avro/pull/305]
CMP0042 is a Mac OSX specific policy changing a default behavior. It was
introduced in CMake version 3.0 and CMake version 3.0.2 warns when the policy
is not set. (see [https://cmake.org/cmake/help/v3.0/policy/CMP0042.html] )
An easy fix would be to replace the line:
{code:java}
cmake_policy (SET CMP0042 NEW)
{code}
With:
{code:java}
if(NOT CMAKE_VERSION VERSION_LESS 3.0)
cmake_policy (SET CMP0042 NEW)
endif()
{code}
Another solution is to raise the CMake requirement to 3.0
--
This message was sent by Atlassian Jira
(v8.3.4#803005)