Skip to content
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

Merged
merged 9 commits into from
Feb 9, 2018
Merged

Schauveau cmake #6

merged 9 commits into from
Feb 9, 2018

Conversation

schauveau
Copy link
Contributor

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

@schauveau
Copy link
Contributor Author

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!

@tskeith
Copy link
Collaborator

tskeith commented Feb 8, 2018

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.

@schauveau
Copy link
Contributor Author

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, ...
I think that we will eventually copy the Diagnostic classes but that will require a bit of cleanup to get something working.
Anyways, this is outside the scope of that pull request which is to provide the global CMake infrastructure.

@sscalpone
Copy link
Member

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?

@schauveau schauveau merged commit 913597e into master Feb 9, 2018
@schauveau
Copy link
Contributor Author

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.

@sscalpone
Copy link
Member

I don't want to get in the habit of merging things we don't need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants