[ https://issues.apache.org/jira/browse/AVRO-3114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17366974#comment-17366974 ]
Thiruvalluvan M. G. edited comment on AVRO-3114 at 6/22/21, 3:27 AM: --------------------------------------------------------------------- Made a pull request with a slightly modified version of the solution suggested by [~Pradeau Christophe] (https://github.com/apache/avro/pull/1271): {code} if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.0) # Enable MACOSX_RPATH by default cmake_policy (SET CMP0042 NEW) endif() {code} was (Author: thiru_mg): 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)