-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schauveau cmake #6
Conversation
There are plenty of unnecessary things especially in the top CMakeLists.txt and in the TableGen files. A lot was copied from Clang. I commented out or removed some useless parts but I also left some pieces of codes that may be useful in the future. So no need to comment about that! |
I was able to follow the instructions in the README to build LLVM and then build f18 on your branch. I made changes to the cmake files to build the lib/parser and lib/semantics and the f18 executable. For the stuff that "may be useful in the future", I would really like to see examples. For example, if we're going to use .td files for diagnostics, a sample diagnostic and a source file that uses it. And if we're going to use gtest, a sample unit test. I think everything else should be removed. |
I also want a Diagnostic example but this is slightly harder that one may imagine. The problem is that the Diagnostic subsystem depends of other classes in the Basic library ; SourceLocation, SourceManager, ... |
Can we break this up into several pull requests? In particular, can we not combine the directory structure and cmake changes with the speculative stuff (tbl gen) or the C++ diagnostic messages yet? |
Sorry! I just merged without noticing your remark. I was not expecting one at that time. Working late? :-) I do not see why it should matter to separate tblgen from the cmake pull request. We can always remove tablegen later if we decide that we do not need it. |
I don't want to get in the habit of merging things we don't need. |
Here is a global cmake build system with a few sample libraries and programs.
f18 and the library files previously added in the repository are currently not handled by cmake (and I erased the top level CMakeList.txt). You can use lib/Sema and the tools/flang-info as examples to create your own CMakeList.txt. I followed the Clang and LLVM naming style for libraries (so in CamelCase) which mean that some files may have to be moved around (e.g. lib/parser vs lib/Parser).
I wrote a quick README for the installation. The principle is very similar to the old flang installation.
If you want to try without waiting for mypush, use my branch schauveau_cmake
https://github.com/ThePortlandGroup/f18/tree/schauveau_cmake