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:26:00 UTC

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

    [ https://issues.apache.org/jira/browse/AVRO-3114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17366974#comment-17366974 ] 

Thiruvalluvan M. G. commented on AVRO-3114:
-------------------------------------------

Made a pull request with a slightly modified version of the solution suggested by [~Pradeau Christophe]:
{code}
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.0)
    # Enable MACOSX_RPATH by default
    cmake_policy (SET CMP0042 NEW)
endif()
{code}

> 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
>            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)