This is an automated email from the ASF dual-hosted git repository.

thiru pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/master by this push:
     new 5bb0320  Not setting policy CMP0042 for version prior to CMake 3.0 
(#1271)
5bb0320 is described below

commit 5bb032029bb2e07e5b9175b72bbf72a6fdef4289
Author: Thiruvalluvan M G <[email protected]>
AuthorDate: Tue Jun 22 09:01:10 2021 +0530

    Not setting policy CMP0042 for version prior to CMake 3.0 (#1271)
---
 lang/c++/CMakeLists.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lang/c++/CMakeLists.txt b/lang/c++/CMakeLists.txt
index bf764ce..6206c35 100644
--- a/lang/c++/CMakeLists.txt
+++ b/lang/c++/CMakeLists.txt
@@ -26,7 +26,10 @@ endif()
 
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 
-cmake_policy (SET CMP0042 NEW)
+if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.0)
+    # Enable MACOSX_RPATH by default
+    cmake_policy (SET CMP0042 NEW)
+endif()
 
 if (NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
     set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)

Reply via email to