hume npx <humeafo at gmail.com> writes:> Hi, Óscar: > nice to hear some voice on this. about LLVM_TOOLS_BINARY_DIR, yes, it > made the installed version work only, if you'd like the uninstalled version > to work, it should be detected as you suggested. > > about LLVM_INSTALL_PREFIX the purpose is to make it really relocatable, > eg, when installed under /lib/llvm I just later need to move the > installation tree to /lusr/local/lib/llvm without re-run cmake and the > time-boring build/install process, and this is especially convinient on > Windows.LLVM_INSTALL_PREFIX is supposed to contain the value of CMAKE_INSTALL_PREFIX when you configured LLVM. Using it for setting other variables is just a convenience.> Use CMAKE_CURRENT_LIST_DIR while not the absolute predefined > LLVM_INSTALL_PREFIX is just to give the freedom to this, if just installed and > not moved, this will work identical to the value original absolute > LLVM_INSTALL_PREFIX points.I've never heard CMAKE_CURRENT_LIST_DIR until now. In fact, it was introduced in cmake 2.8.3 while the LLVM CMake scripts require just 2.8. The solution may work indeed, but I'm always reluctant to increase the minimum required version because there are users who can't easily upgrade their CMake install. Let's see what Chandler says. CMAKE_CURRENT_LIST_FILE can be used instead (just take the directory part) but I don't know when it was introduced. In http://www.cmake.org/Wiki/CMake_Useful_Variables CMAKE_CURRENT_LIST_DIR is labeled as 2.8.3 but there is no mention to the version that introduced CMAKE_CURRENT_LIST_FILE.> CMAKE_MODULE_PATH should be corrected for installed version,No, it is the responsability of the user to adjust CMAKE_MODULE_PATH for containing the directory where LLVMConfig.cmake is. See http://llvm.org/docs/CMake.html#embedding For an uninstalled build, the cmake scripts on the source directory are necessary as well, so its directory is automatically added on LLVMConfig.cmake.> it's still > points to the source tree location while not the install tree location, if > you removed/moved the source tree after installation, the installed version > will not work properly, surely this is not we wanted?No, see again how that code block begins: # If failed, we assume that this is an un-installed build: if( NOT LLVMCONFIG_INCLUDED ) that means that CMAKE_MODULE_PATH is only modified for an uninstalled build.> as to uninstalled support, I think current script doesn'tsupport the cmake > usage properly,Why? Please describe a case.> If this is needed, some further work should be made.
*hi,Óscar:* * * >LLVM_INSTALL_PREFIX is supposed to contain the value of> >CMAKE_INSTALL_PREFIX when you configured LLVM. Using it for setting > >other variables is just a convenience. >> Ok, I understood your point, so I'd like to develop another patch to make > it relocatable and respect the original meanings. >> >CMAKE_CURRENT_LIST_FILE can be used instead (just take the directory > >part) but I don't know when it was introduced. In >> CMAKE_CURRENT_LIST_FILE is introduced at least in 2.6.4, if for > compatibility reasons , get_file_component and this var can achieve the > same effect. > > >No, it is the responsability of the user to adjust CMAKE_MODULE_PATH for > >containing the directory where LLVMConfig.cmake is. See >Ok, I understood your design principles, so I'd develp another patch.>Why? Please describe a case. > I need to do some futher experiment and to see whether I have been wrong. > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120629/eae55114/attachment.html>
> > *hi,Óscar:* > * * > >Why? Please describe a case. >> >I need to do some futher experiment and to see whether I have been > wrong. >Since I touch this problem several months ago, so I did some test using the 3.2svn, the reason why uninstalled build 'cmake not work lies in set(LLVM_INSTALL_PREFIX @LLVM_INSTALL_PREFIX@) set(LLVM_INCLUDE_DIRS ${LLVM_INSTALL_PREFIX}/include) set(LLVM_LIBRARY_DIRS ${LLVM_INSTALL_PREFIX}/lib) LLVM_INCLUDE_DIRS and LLVM_LIBRARY_DIRS points to the user specified or install tree location, but for uninstalled version, they are non-exist yet(because not run make install), so set CMAKE_PREFIX_PATH to builddir\share\llvm\cmake and then do things as described in http://llvm.org/docs/CMake.html using find_package(LLVM) and then include_directories( ${LLVM_INCLUDE_DIRS} ) link_directories( ${LLVM_LIBRARY_DIRS} ) will cause the problem, the directory are not present for the built but uninstalled source tree.> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120629/ca472e2b/attachment.html>
Possibly Parallel Threads
- [LLVMdev] [cfe-dev] is configure+make dead yet?
- [LLVMdev] [cfe-dev] is configure+make dead yet?
- [LLVMdev] [cfe-dev] is configure+make dead yet?
- [LLVMdev] [PATCH] llvm-config: Add support for LIBDIR_SUFFIX.
- [LLVMdev] [PATCH] llvm-config: Add support for LIBDIR_SUFFIX.