From ed038c2a107854d64d292406b32b34d608818cdd Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Thu, 22 Jun 2017 09:42:22 +0100 Subject: [PATCH] [CMake] Fix CMake warning about CMP0042 on macOS --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ed7ee06a..6f39cac13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,11 @@ if (POLICY CMP0054) cmake_policy(SET CMP0054 OLD) endif() +if (POLICY CMP0042) + # Enable `MACOSX_RPATH` by default. + cmake_policy(SET CMP0042 NEW) +endif() + set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX "${CMAKE_CURRENT_SOURCE_DIR}/cmake/cxx_compiler_flags_overrides.cmake") project(Z3 CXX)