Kuba Ober
2014-Mar-08 22:52 UTC
[LLVMdev] Why are the tablegen files excluded from source lists/
My problem is that the .td and .h files are not shown as sources in the codeblocks (.cbp) output generated by cmake. I’m consuming the .cbp file with Qt Creator - it’s seems to be an otherwise excellent tool for llvm development. It seems that the culprit is llvm_process_sources function in cmake/modules/LLVMProcessSources.cmake. The addition of .td sources and header files is wrapped in the following conditional: if( MSVC_IDE OR XCODE ) Is this necessary at all? At least for codeblocks output, removal of this conditional has no ill effects and adds the .td and .h files to the sources list. At the very least, this should be expanded to include codeblocks, but I don’t know what magical macro is set when producing the .cbp file. Are there any cmake outputs where the addition of those extra sources would be an error? Cheers, Kuba Ober
NAKAMURA Takumi
2014-Mar-10 13:55 UTC
[LLVMdev] Why are the tablegen files excluded from source lists/
Kuba, I think reasonable. I don't check changes on codeblocks, though. Before we would tweak them to be generic to several IDEs, could you try my suggestions locally? You may try to change "if(MSVC_IDE OR XCODE)" to "if(TRUE)" locally ;) * llvm/CMakeLists.txt:255 LLVM_LIT_ARGS It affects "check-*" to run test scripts. -s displays colorful progression. This assumes terminal window. --no-progress-bar displays simple progression by text. Without -s (-v), each test status will be put in console. You may examine how to work to set LLVM_LIT_ARGS to arbitrary value. * llvm/cmake/modules/LLVMProcessSources.cmake:45 It controls whether to add header files to project files. To confirm this, please see LLVMSupport in your project viewer. * llvm/include/llvm/CMakeLists.txt It creates a dummy target, llvm_headers_do_not_build, to the project. * clang/CMakeLists.txt:295 It adds clang's public headers to each clang library. Note that it would also require to tweak LLVMProcessSources.cmake. We don't intend to reject Code::Blocks. Simply just no one (in developers) didn't use one, AFAIK. Please be patient. ...Takumi 2014-03-09 7:52 GMT+09:00 Kuba Ober <kuba at mareimbrium.org>:> My problem is that the .td and .h files are not shown as sources > in the codeblocks (.cbp) output generated by cmake. I'm consuming > the .cbp file with Qt Creator - it's seems to be an otherwise > excellent tool for llvm development. > > It seems that the culprit is llvm_process_sources > function in cmake/modules/LLVMProcessSources.cmake. > > The addition of .td sources and header files is wrapped > in the following conditional: > > if( MSVC_IDE OR XCODE ) > > Is this necessary at all? At least for codeblocks output, > removal of this conditional has no ill effects and adds the > .td and .h files to the sources list. > > At the very least, this should be expanded to include codeblocks, > but I don't know what magical macro is set when producing the .cbp > file. > > Are there any cmake outputs where the addition of those extra > sources would be an error? > > Cheers, Kuba Ober > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Kuba Ober
2014-Mar-10 16:21 UTC
[LLVMdev] Why are the tablegen files excluded from source lists/
Takumi, Thank you for all the pointers, they have been quite helpful. So, in a nutshell, it seems that both conditional checks below can be removed: * llvm/cmake/modules/LLVMProcessSources.cmake:45 * clang/CMakeLists.txt:295 I’ve checked it with "Unix Makefile” and “Ninja” generators, as both are supported by Qt Creator. ***> You may try to change "if(MSVC_IDE OR XCODE)" to "if(TRUE)" locally ;)> * llvm/cmake/modules/LLVMProcessSources.cmake:45I know about that one. As I’ve said, I’ve changed it and there are seemingly no ill effects. I simply wonder if the conditional should be permanently removed or set to TRUE, as it seems counterproductive.> * llvm/CMakeLists.txt:255 LLVM_LIT_ARGSThis disables the progress bar for XCODE and MSVC. Probably neither of those IDEs have the code to understand progress output, so it may as well remain disabled. I see no reason to change it at the moment.> * clang/CMakeLists.txt:295 > It adds clang's public headers to each clang library. > Note that it would also require to tweak LLVMProcessSources.cmake.This is interesting. You refer here to add_clang_library. On the surface it seems to duplicate what’s already present in llvm_process_sources, but it only seems so. It calls llvm_add_library, and that calls llvm_process_sources if no OBJLIBS argument is given. Alas, it must be that OBJLIBS are given, and llvm_process_sources is not called since the .td and .h files are not added unless the conditional check is removed here. Cheers, Kuba Ober On Mar 10, 2014, at 9:55 AM, NAKAMURA Takumi <geek4civic at gmail.com> wrote:> Kuba, > > I think reasonable. I don't check changes on codeblocks, though. > > Before we would tweak them to be generic to several IDEs, could you > try my suggestions locally? > You may try to change "if(MSVC_IDE OR XCODE)" to "if(TRUE)" locally ;) > > * llvm/CMakeLists.txt:255 LLVM_LIT_ARGS > It affects "check-*" to run test scripts. > -s displays colorful progression. This assumes terminal window. > --no-progress-bar displays simple progression by text. > Without -s (-v), each test status will be put in console. > You may examine how to work to set LLVM_LIT_ARGS to arbitrary value. > > * llvm/cmake/modules/LLVMProcessSources.cmake:45 > It controls whether to add header files to project files. > To confirm this, please see LLVMSupport in your project viewer. > > * llvm/include/llvm/CMakeLists.txt > It creates a dummy target, llvm_headers_do_not_build, to the project. > > * clang/CMakeLists.txt:295 > It adds clang's public headers to each clang library. > Note that it would also require to tweak LLVMProcessSources.cmake. > > We don't intend to reject Code::Blocks. Simply just no one (in > developers) didn't use one, AFAIK. > Please be patient. > > ...Takumi > > 2014-03-09 7:52 GMT+09:00 Kuba Ober <kuba at mareimbrium.org>: >> My problem is that the .td and .h files are not shown as sources >> in the codeblocks (.cbp) output generated by cmake. I'm consuming >> the .cbp file with Qt Creator - it's seems to be an otherwise >> excellent tool for llvm development. >> >> It seems that the culprit is llvm_process_sources >> function in cmake/modules/LLVMProcessSources.cmake. >> >> The addition of .td sources and header files is wrapped >> in the following conditional: >> >> if( MSVC_IDE OR XCODE ) >> >> Is this necessary at all? At least for codeblocks output, >> removal of this conditional has no ill effects and adds the >> .td and .h files to the sources list. >> >> At the very least, this should be expanded to include codeblocks, >> but I don't know what magical macro is set when producing the .cbp >> file. >> >> Are there any cmake outputs where the addition of those extra >> sources would be an error? >> >> Cheers, Kuba Ober >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Maybe Matching Threads
- [LLVMdev] Building poolalloc with current LLVM development branch?
- llc error
- [LLVMdev] Building poolalloc with current LLVM development branch?
- [LLVMdev] Building poolalloc with current LLVM development branch?
- [LLVMdev] LLVM use of C++ exceptions and RTTI