-
Notifications
You must be signed in to change notification settings - Fork 1.6k
CMake setup #1278
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
Comments
Can you be more specific please, or even prepare a PR for discussion ? It is quite likely that none of us who contributed to the current cmake build framework are enlightened about the true capabilities, but just dropping a "this is not how you do it" here will probably help noone. (Not requiring the latest and greatest release of cmake for building is considered a feature however) |
I do intend to provide a pull request but just posted this to find out some background and whether it is intended for some reason or if it is being worked on somewhere. Currently, almost everything is done manually: from choosing cflags (like -O2), detecting fPIC, choosing build types (release and debug), choosing output directories, detecting architecture/OS, building static and shared libs, finding programs and so on and so forth. None of this requires CMake 3.0 or newer. It can all be done on CMake 2.8 just fine. |
Can you make one line PR unintentionally to put us on right path? Your chat is too generic to act upon. |
It is quite possible that the current cmake files are basically literal translations of the GNU Makefiles, written by people much more familiar with the latter. (This is certainly true for any changes I made there). If I am not mistaken, they still carry a warning that the resulting library may be different from what a plain |
This is exactly the situation. As CMake has a lot of autoconfiguration, much of the checks and manual flag placement that are required in Makefiles can be removed. Also, people who use CMake expect it to operate different. Due to the auto-configuration nature of CMake it is generally assumed it works on multiple platforms as well. Right now it works only on Windows, with x86 processors, with fortran enabled and under specific conditions. I have made a PR #1279 that goes towards fixing these issues. It now builds on Linux and without fortran available. I have removed a substantial amount of manual configuration but there is still a lot of work to do. I plan to have it supporting other architectures such as ARM and other platforms such as Andoid and iOS soon as this specifically benefits my projects. |
If this is true it must be a very recent breakage in the "develop" branch, possibly a side effect of #1256 |
There was a number of other blockers for Linux, such as the utest running without fortran enabled. I just fixed another one. The kernel/Makefile.LA files did not exist in CMakeLists.txt, for example. That's why I have also enabled CI for the Linux-specific CMake builds. They are usually a good indication that every non-Windows platform is broken. |
Currently everything seems to be manual set up in CMake rather than using CMakes features.
Things like setting up debug/release configuration, setting up the CFLAGS, setting up certain variables that already exist in CMake.
This should all be left to CMake and the file will be easier to maintain and work everywhere.
The text was updated successfully, but these errors were encountered: