[llvm] r268048 - cmake: Set LINK_POLLY_INTO_TOOLS to ON (v2)

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Wed May 4 01:43:22 PDT 2016


> >> +if(WITH_POLLY)
> >> +  if(NOT EXISTS ${LLVM_MAIN_SRC_DIR}/tools/polly/CMakeLists.txt)
> >> +    set(WITH_POLLY OFF)
> >> +  endif()
> >> +endif(WITH_POLLY)
> >> +
> >> +if (NOT WITH_POLLY)
> >> + set(LINK_POLLY_INTO_TOOLS OFF)
> > 
> > Is this usage of set() correct? IIUC it creates a new non-cached
> > variable that happens to have the same name as the option above. At the
> > very least, I see both WITH_POLLY and LINK_POLLY_INTO_TOOLS set to on in
> > my CMakeCache after configuring with this, despite not having polly
> > checked out.
> 
> I think this is correct. The behavior intended was that the user facing
> options are not changed (in case the user checks out Polly later on),
> but to ignore these options and to disable the Polly build in case Polly
> has not been checked out. As the newly created non-cache variable will
> hide the older cache variable [2] this seems to be exactly what is
> happening.
> 
> Now, I agree that this is clearly unintuitive. I will see if I can come
> up with something better and post it for review.

http://reviews.llvm.org/D19907

Best,
Tobias


More information about the llvm-commits mailing list