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

Cannot build with ninja #261

Open
lolzballs opened this issue Dec 10, 2022 · 2 comments · May be fixed by #740
Open

Cannot build with ninja #261

lolzballs opened this issue Dec 10, 2022 · 2 comments · May be fixed by #740
Labels
new feature New feature or request
Milestone

Comments

@lolzballs
Copy link

lolzballs commented Dec 10, 2022

Is there a reason why PreLoad.cmake exists? If I try to use cmake to output ninja build files, the hardcoding of "Unix Makefiles" in PreLoad.cmake prevents it from working.

| CMake Error: Error: generator : Ninja
| Does not match the generator used previously: Unix Makefiles
| Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.Running with expanded trace output on.
| Not searching for unused variables given on the command line.
| Trace will be written to cmake_trace.txt
@mctriplett
Copy link
Member

We use the PreLoad.cmake to enforce a generator for MinGW compatibility, and avoid having the user provide an argument manually to simplify the build process. As you note, the downside is that it prevents an experienced user from overriding such an argument from the command line as they usually would.

For your own purposes, it should be safe to remove the file or adjust it to your needs. I only ask that when you submit a PR that you do not commit that particular change.

It should also be noted that we have not tested the build system or library using any makefile generators other than Unix Makefiles, and while I don't expect issues, I can't be 100% sure of the behavior you'll see. If Ninja works much better for you, either in performance or some other way, please let us know, either here or on our discourse forum.

@lolzballs
Copy link
Author

For your own purposes, it should be safe to remove the file or adjust it to your needs. I only ask that when you submit a PR that you do not commit that particular change.

Makes sense, that's what I've been doing.

If Ninja works much better for you, either in performance or some other way, please let us know

I was previously told Ninja would typically be faster than GNU Make.
I did some quick and dirty benchmarking to confirm this, and for openfhe-development's default CMake options make takes on average ~85s while Ninja takes ~69s on a Ryzen 5900X (24 threads).

@yspolyakov yspolyakov added this to the Future Releases milestone Mar 10, 2023
@autoantwort autoantwort linked a pull request Apr 18, 2024 that will close this issue
@yspolyakov yspolyakov added the new feature New feature or request label Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants