-
Notifications
You must be signed in to change notification settings - Fork 6
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
Clean compilation scripts and document compilation procedure #39
Comments
A nice addition to the cmake build could be taken from the autotools scripts : in addition to the hash of the last commit, check if the code is modified or if the source tree is clean. See https://github.com/xcompact3d/x3div/blob/hack_DC_TGV/configure.ac#L203 |
CMake is cross platform, so it's a single definition to build them all. This means you shouldn't have to write any CMake to build the code on different/new architectures. All you need to type is
Happy to leave the Makefile until the CMake definitions can deal with just as much cases, but after this I think it should go. This would be redundant since CMake will generate the Makefile. |
Does this overlap with #33 ? |
Usually, new architectures are associated with specific compiler / linker options, and can even be associated with different compilers. Changing the compiler or the compiler / linker options in the Makefile is relatively simple, although not documented. In my opinion, the Makefile could be removed only if the cmake script allow users to easily change the compiler and the compiler / linker options. Currently, this might be possible, but it is not documented at all. |
It does overlap with #33 , I have tried to clarify the present issue. |
I see your point. Yes, it should do. Most options (like compiler or link/compile flags) can be defined at configure or build time. This is a fairly typical use of CMake. |
We could use makedepf90 with the Makefile to sort out the dependencies. I'd rather keep the makefile around as I can generally figure out what's going wrong/what I want to change, CMake either works out of the box or doesn't for me |
Currently, compilation of the code can be performed using the provided
On the one hand, keeping the Makefile is probably a good idea so that one (not very familiar with the cmake syntax) can quickly test the code on new architectures. On the other hand, keeping both the cmake and autotools is probably a bad idea, and the autotools should be removed later on (v3).
It could be interesting to have a Makefile with explicit file dependencies so that parallel make would work with both Makefile and cmake.
The compilation using cmake should be clearly documented. Some clusters have support for cmake but no support for ccmake or cmake-gui. Thus, it is important to document clearly all the cmake options one can use from the command-line.
The text was updated successfully, but these errors were encountered: