[compiler-rt] r261797 - [CMake] Default CMAKE_MACOSX_RPATH to On, this is the default with CMP0042
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 24 14:29:42 PST 2016
Author: cbieneman
Date: Wed Feb 24 16:29:42 2016
New Revision: 261797
URL: http://llvm.org/viewvc/llvm-project?rev=261797&view=rev
Log:
[CMake] Default CMAKE_MACOSX_RPATH to On, this is the default with CMP0042
Summary: Building the sanitizer libraries without rpaths causes all sorts of problems when you try to use them. This simple fix should make it all work.
Reviewers: samsonov, zaks.anna
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D17556
Modified:
compiler-rt/trunk/CMakeLists.txt
Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=261797&r1=261796&r2=261797&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Wed Feb 24 16:29:42 2016
@@ -31,6 +31,9 @@ if(CMAKE_VERSION VERSION_LESS 2.8.12)
# Invalidate a couple of keywords.
set(cmake_2_8_12_INTERFACE)
set(cmake_2_8_12_PRIVATE)
+ if(APPLE)
+ set(CMAKE_MACOSX_RPATH On)
+ endif
else()
# Use ${cmake_2_8_12_KEYWORD} intead of KEYWORD in target_link_libraries().
set(cmake_2_8_12_INTERFACE INTERFACE)
@@ -38,6 +41,9 @@ else()
if(POLICY CMP0022)
cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
endif()
+ if(POLICY CMP0042)
+ cmake_policy(SET CMP0042 NEW) # automatic when 2.8.12 is required
+ endif()
endif()
# Top level target used to build all compiler-rt libraries.
More information about the llvm-commits
mailing list