Skip to content
  • Tobias Grosser's avatar
    cmake: Prefix Polly options with LLVM_ to avoid variable shadowing · 3b326169
    Tobias Grosser authored
    Summary:
    Before this change certain Polly variables have been used both as user-facing
    CACHED cmake variables as well as uncached internal variables. Even though
    this seems to have worked OK in practice, the behavior only worked due to
    one variable shadowing the other. This behavior has been found confusing.
    To make the use of cmake variables more clear we now prefix the cached, user
    facing variables with LLVM_ as it is common habit for LLVM options and also
    moved the _POLLY_ term to the beginning to ensure related options are sorted
    after each other. The variables that control the behavior of LLVM/Polly are then
    set by forwarding the values set in the user facing option variables.
    As a result, Polly is now enabled with LLVM_POLLY_BUILD instead of BUILD_POLLY
    and the linking behavior of Polly is controlled with LLVM_POLLY_LINK_INTO_TOOLS
    instead of LINK_POLLY_INTO_TOOLS.
    
    Reviewers: bogner, Meinersbur
    
    Subscribers: pollydev, llvm-commits
    
    Differential Revision: http://reviews.llvm.org/D19907
    
    llvm-svn: 268537
    3b326169
Loading