[llvm] r202085 - Permit CMAKE_INSTALL_RPATH to be set on command line

Bernard Ogden bogden at arm.com
Fri Feb 28 14:25:50 PST 2014


Resending for benefit of llvm-commits (I’m having mail client issues):

Hi Rafael,

For our purposes I want CMAKE_BUILD_WITH_INSTALL_RPATH on, so the current
code works for us (T). I could imagine that someone might want to update
them independently so controlling both based on whether RPATH is defined
does  feel quite right.

In general, one could argue that we need an "if not defined" guard around
every setting of a variable - maybe its best to just add such guards as
and when someone needs them.

Regards,

Bernie

On 25 Feb 2014, at 14:33, Rafael Espíndola <rafael.espindola at gmail.com> wrote:

> Sorry about that. Don't you want to skip the full thing, including
> CMAKE_BUILD_WITH_INSTALL_RPATH?
> 
> On 24 February 2014 17:23, Bernard Ogden <bogden at arm.com> wrote:
>> Author: bogden
>> Date: Mon Feb 24 16:23:43 2014
>> New Revision: 202085
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=202085&view=rev
>> Log:
>> Permit CMAKE_INSTALL_RPATH to be set on command line
>> 
>> Commit 201921 overrides setting of CMAKE_INSTALL_RPATH via the
>> command line. Last time this happened we applied another patch
>> to only set CMAKE_INSTALL_RPATH if already defined (r197825).
>> This patch does the same thing again, but only for the UNIX
>> case - we leave APPLE alone as presumably the original committer
>> is happy with the non-overriding behaviour.
>> 
>> Modified:
>>    llvm/trunk/CMakeLists.txt
>> 
>> Modified: llvm/trunk/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=202085&r1=202084&r2=202085&view=diff
>> ==============================================================================
>> --- llvm/trunk/CMakeLists.txt (original)
>> +++ llvm/trunk/CMakeLists.txt Mon Feb 24 16:23:43 2014
>> @@ -428,7 +428,9 @@ if (APPLE)
>>   set(CMAKE_INSTALL_NAME_DIR "@rpath")
>>   set(CMAKE_INSTALL_RPATH "@executable_path/../lib")
>> else(UNIX)
>> -  set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib")
>> +  if(NOT DEFINED CMAKE_INSTALL_RPATH)
>> +    set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib")
>> +  endif(NOT DEFINED CMAKE_INSTALL_RPATH)
>> endif()
>> 
>> set(CMAKE_INCLUDE_CURRENT_DIR ON)
>> 
>> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 






More information about the llvm-commits mailing list