-
Notifications
You must be signed in to change notification settings - Fork 90
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
CMake: Build Python API #2298
CMake: Build Python API #2298
Conversation
The files are part of $(TOGEN)
If requested, but requirements are not present, this will fail, rather then ignore the requested option
Default is to enable, if requirements are present.
Awesome, thanks @dschwoerer ! Overall it looks good. To make it a bit cleaner, I'd probably move the numpy stuff into I'm not sure about forcing shared libs on. It might be nicer to instead have an overall default of shared libs and then a check and fatal error if they're not enabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, a few pointers on how to polish the CMake a bit
* next: (349 commits) Delete integrated test of FieldFactory: replaced by unit tests Convert ersatz MMS tests to use library MMS features Disable tests by default if building as part of another project CMake rename PACKAGE_TESTS to BOUT_TESTS Add some docs for formatting `Options` to string Fix for conditionally used boundary condition inputs in 'all' Further improve test-invpar fix WithQuietOutput speedup test-invpar Update .gitignore Enable running tests in parallel Add test for invalid Options format string Fix more clang-tidy suggestions Fix clang-tidy suggestions Replace OptionINI::writeSection with fmt::format Print docstring and type info for unused inputs Fix `Options` formatting to handle values correctly Add more format specs for `Options`: key-only and source attribute Add `fmt::formatter` for `Options` Restrict Options implicit cast operator to only types in variant ...
@dschwoerer I've made some changes, are you ok with them? |
Now stops immediately if option was `MAYBE`, and FATAL_ERROR if option was turned on
Yes, looks good. Sorry I didn't get around to it myself. Much appreciated 👍 |
Add cmake instructions for boutcore
Resolves #1940
Resolves #2289
I need to remove the commented out code, but maybe @ZedThree also has some further ideas to cleanup.
I am not sure about auto-enabling. The issue is that in order to build a .so,
-fPIC
is needed, which seems to be only inserted withBUILD_SHARED_LIBS=ON
.I also just noticed I need to move this a bit further down, so it is only enabled when we are building the interface.
BOUT-dev/CMakeLists.txt
Line 428 in 1dd83c6