-
Notifications
You must be signed in to change notification settings - Fork 262
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
Add root CMakeLists.txt #415
Conversation
6d2840d
to
0385db3
Compare
Thanks. It might be a while before I can take a look (surgery coming up Wednesday). Also, can you rebase it to the dev2 branch? |
This probably needs a bit more testing before it can be merged. It'll also probably conflict with some other open PRs (which are arguably still higher priority - e.g., #404, #411, #412, #413). All in all no hurry with this PR.
Sorry. Forgot to change it from the default setting... |
The last couple of changes add support for building CSparse with the root CMakeLists.txt file. It isn't built by default though. |
62f1596
to
a878fbe
Compare
I'm not sure what's going on with the CI. For some reason it's building on my fork:
That line doesn't even contain a I'm giving up for today. Maybe more luck tomorrow... |
e8cc043
to
71202e0
Compare
Ah. I wasn't aware the the CI runs on a merge commit. So, the ominous build errors disappeared after a rebase. The remaining build error will likely disappear once #409 is fixed. |
cd50e1e
to
d4c05f8
Compare
5b10952
to
44af2f8
Compare
98429ea
to
a8581fd
Compare
There might still be room for improvement. But this is probably good enough for a start. Marking as ready for test. |
OK! I'll merge it in and give it a try. |
68297c3
into
DrTimothyAldenDavis:dev2
Works great for me -- thanks! One minor change: I revised SuiteSparse_config/Config/README.md.in, updating it with the latest top-level README.md (see the latest PR). A few minor questions I'm sure you're aware of: LAGraph and Mongoose both have ctests, and all of the packages have their demos. How do those get run from the top-level cmake? If the simple answer is "they don't", that's fine. They can be run by building the individual packages as before. LAGraph places its compiled libraries in SuiteSparse/build, but for all other packages they go in SuiteSparse/PACKAGE/build. Is that because LAGraph needs to remain a stand-alone package in its own repo, at |
The Mongoose ctests currently don't run correctly cross-platform. See #497 for a potential fix.
It might make sense to convert (some of) the demos to ctests. That way they would be run the same way from the root CMakeLists.txt file (once the previous part is also done).
Oops. That was an oversight. There is no actual reason to treat it differently. See #496 for a change that removes that difference. |
This is a rudimentary attempt to add a CMakeLists.txt to the root directory.
It uses the CMake flag
SUITESPARSE_ENABLE_PROJECTS
to be able to select which projects should be build. The default value"all"
means that (almost) all projects in SuiteSparse are built.That excludes CSparse which is never installed.
Users would need to build CSparse as a standalone project.Users would need to specify that library explicitly inSUITESPARSE_ENABLE_PROJECTS
.Additionally, the CUDA projects (SuiteSparse_GPURuntime and GPUQREngine) are only built automatically if a working CUDA environment can be detected by CMake (or if the user specifies that they should be built anyway).
When selecting a project, all its dependencies are also added to the list of enabled projects.
A possible workflow could look like this:
Or if, e.g., only CHOLMOD (and its dependencies) should be built:
That list can also contain multiple projects. E.g.:
I tried to keep the option to build each project stand-alone. That is needed to stay compatible with the root Makefile.
This fixes #175.