-
Notifications
You must be signed in to change notification settings - Fork 274
CMake builds: set a default build type (Release) #5646
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
Conversation
73f8795
to
ae86668
Compare
Codecov Report
@@ Coverage Diff @@
## develop #5646 +/- ##
========================================
Coverage 69.54% 69.54%
========================================
Files 1243 1243
Lines 100701 100701
========================================
Hits 70037 70037
Misses 30664 30664
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
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.
This seems like a reasonable change for a reasonable reason. I don't know CMake well enough to know if this is the best way of doing it. Can we simplify the build instructions using CMake?
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.
This is harmless, but normally a user should specify a build type and if our documentation doesn't say so we should fix that.
In absence of a default build type, CMake would not use any pre-defined build configuration. As a consequence, any user running CMake without setting -DCMAKE_BUILD_TYPE would end up with builds without optimisation, and thus (surprisingly!) poor performance. The fix is copied from https://stackoverflow.com/questions/48832233/have-a-cmake-project-default-to-the-release-build-type.
ae86668
to
2a17a11
Compare
We didn't clearly state this in our documentation. I have now tried to fix that as well. |
In absence of a default build type, CMake would not use any pre-defined
build configuration. As a consequence, any user running CMake without
setting -DCMAKE_BUILD_TYPE would end up with builds without
optimisation, and thus (surprisingly!) poor performance.