berndporr / iir1

DSP IIR realtime filter library written in C++

Home Page:http://berndporr.github.io/iir1/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CMake MACOSX_RPATH warning

bear24rw opened this issue · comments

On MacOS with cmake 3.19.0 I get the following warning:

CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

   iir

This warning is for project developers.  Use -Wno-dev to suppress it.

I believe the correct fix is to adopt the new behavior:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 968373e..9f923be 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,6 +8,7 @@ if(${CMAKE_VERSION} VERSION_LESS "3.0.0")
        set(PROJECT_VERSION 1.7.8)
        project(iir)
 else()
+       cmake_policy(SET CMP0042 NEW) # enable MACOSX_RPATH by default
        cmake_policy(SET CMP0048 NEW) # set VERSION in project()
        project(iir VERSION 1.7.8 LANGUAGES CXX)
 endif()

Thanks! I've added it. Can you try it out?

Works, thanks!