You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Thiruvalluvan M. G. (Jira)" <ji...@apache.org> on 2021/06/22 03:31:00 UTC

[jira] [Assigned] (AVRO-3114) Compilation broken on cmake < 3.0

     [ https://issues.apache.org/jira/browse/AVRO-3114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thiruvalluvan M. G. reassigned AVRO-3114:
-----------------------------------------

    Assignee: Pradeau Christophe

> 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.9.0, 1.10.2
>            Reporter: Pradeau Christophe
>            Assignee: Pradeau Christophe
>            Priority: Major
>
> 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)