-
-
Notifications
You must be signed in to change notification settings - Fork 189
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
[WIP] Add cmake build scheme #3068
Draft
SteveBronder
wants to merge
90
commits into
develop
Choose a base branch
from
feature/cmake-tests
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+165,277
−3,981
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… options for unit and prob test folders
Sorry closing for now, thought opening up a draft would not turn on the tests |
Reopening to test some jenkins things. Still not ready for review |
…' into feature/cmake-tests
…' into feature/cmake-tests
…' into feature/cmake-tests
@serban-nicusor-toptal would it be possible to update the cmake version on jenkins to > 3.18? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This adds a cmake build system for Stan Math. The main features are
FetchContent
module. So users can call the following to include stan math into their library that also uses cmakeFetchContent_Declare( stanmath GIT_REPOSITORY https://github.com/stan-dev/math GIT_TAG develop ) // later for building their executable target_link_libraries(my_ex stanmath::stanmath)
Importantly, this allows stan and cmdstan etc to do the above which is nice.
It seems like this takes much less time to compile per folder. For example the
test/unit/math/mix/fun
tests all compile into one object file which took about 12 minutes on my machine using 24 cores (and at max about 65 gb of memory)The prob tests also work and are broken down by folder
I'd like to make targets for all of
unit
and all ofprob
to put into jenkins.The expression tests are not setup yet but I'll have them done before this pr is merged.
A few other things that need to be done / checked before merge
Tests
I'm not sure how to test the cmake files but am open to suggestions
Release notes
Replace this text with a short note on what will change if this pull request is merged in which case this will be included in the release notes.
Checklist
Copyright holder: Steve Bronder
The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
the basic tests are passing
./runTests.py test/unit
)make test-headers
)make test-math-dependencies
)make doxygen
)make cpplint
)the code is written in idiomatic C++ and changes are documented in the doxygen
the new changes are tested