Skip to content

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

Merged
merged 1 commit into from
Jan 11, 2021

Conversation

tautschnig
Copy link
Collaborator

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.

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@codecov
Copy link

codecov bot commented Dec 10, 2020

Codecov Report

Merging #5646 (2a17a11) into develop (4cc9611) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #5646   +/-   ##
========================================
  Coverage    69.54%   69.54%           
========================================
  Files         1243     1243           
  Lines       100701   100701           
========================================
  Hits         70037    70037           
  Misses       30664    30664           
Flag Coverage Δ
cproversmt2 43.32% <ø> (ø)
regression 66.44% <ø> (ø)
unit 32.25% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4cc9611...2a17a11. Read the comment docs.

Copy link
Collaborator

@martin-cs martin-cs left a 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?

Copy link
Contributor

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.
@tautschnig
Copy link
Collaborator Author

This is harmless, but normally a user should specify a build type and if our documentation doesn't say so we should fix that.

We didn't clearly state this in our documentation. I have now tried to fix that as well.

@tautschnig tautschnig merged commit c0dc9e7 into diffblue:develop Jan 11, 2021
@tautschnig tautschnig deleted the cmake-default branch January 11, 2021 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants