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

Restructure compilation documentation #6109

Merged

Conversation

thomasspriggs
Copy link
Collaborator

@thomasspriggs thomasspriggs commented May 12, 2021

This PR restructures the compilation documentation. We have received some feedback that the compilation instructions are difficult to follow for new users. This PR makes things more straight forward for new users to follow.

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • 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).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

Becuase some platforms are not tested in CI, a new user would be well
adviced to try a platform which is tested if they have choice.
The complete repository can be built using fewer build step using CMake
than using the hand-written makefiles. Therefore people who are new to
building CBMC should be able to get started more quickly using the CMake
build than the make build. Therefore it makes sense for them to read
about that build system first.
In order to match the version of visual studio and tool chain currently
tested in CI.
Because "shoud" is not the correct spelling.
Because this was previously missing and it might not have been obvious
for anyone unfamiliar with the build system.
Because this helps document the way CBMC is currently built in CI. This
is usefull both for reference compared to local builds and for working
out why CI builds are failing on PRs.
To match the ordering in the outline at the top.
To distance this section from the comparitively well-maintained Visual
Studio 2019 with cmake build.
Copy link
Contributor

@NlightNFotis NlightNFotis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with some minor comments.

COMPILING.md Outdated Show resolved Hide resolved
COMPILING.md Outdated Show resolved Hide resolved
[official download page](https://cmake.org/download) on those systems.
The dependencies (as listed in the relevant sections above) will also be
required, and should be installed using the suggested methods.
2. Navigate to the *top level* folder of the project. This is different from
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add the second sentence as a bullet point, or add the paths in parentheses (cbmc vs cbmc/src/) to make it a bit less confusing?

COMPILING.md Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented May 12, 2021

Codecov Report

Merging #6109 (c112db2) into develop (4c14789) will increase coverage by 0.75%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #6109      +/-   ##
===========================================
+ Coverage    74.52%   75.27%   +0.75%     
===========================================
  Files         1447     1447              
  Lines       157808   157988     +180     
===========================================
+ Hits        117610   118930    +1320     
+ Misses       40198    39058    -1140     
Impacted Files Coverage Δ
src/util/type.cpp 44.44% <0.00%> (-33.34%) ⬇️
src/ansi-c/c_typecheck_base.cpp 50.68% <0.00%> (-27.55%) ⬇️
src/goto-programs/remove_returns.cpp 74.84% <0.00%> (-24.53%) ⬇️
src/util/parse_options.cpp 59.61% <0.00%> (-21.16%) ⬇️
src/ansi-c/literals/convert_character_literal.cpp 53.84% <0.00%> (-17.95%) ⬇️
src/goto-programs/goto_program.cpp 53.04% <0.00%> (-13.57%) ⬇️
src/ansi-c/anonymous_member.cpp 84.61% <0.00%> (-10.26%) ⬇️
src/util/xml.cpp 62.83% <0.00%> (-10.14%) ⬇️
src/util/simplify_expr_floatbv.cpp 86.82% <0.00%> (-9.31%) ⬇️
src/ansi-c/ansi_c_convert_type.cpp 70.17% <0.00%> (-8.56%) ⬇️
... and 71 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 25a7b36...c112db2. Read the comment docs.

Copy link
Collaborator

@tautschnig tautschnig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for improving the documentation!

COMPILING.md Outdated Show resolved Hide resolved
COMPILING.md Show resolved Hide resolved
COMPILING.md Show resolved Hide resolved
Building with CMake is supported across Linux, MacOS X and Windows with Visual
Studio 2019. There are also hand-written make files which can be used to build
separate binaries independently. Usage of the hand-written make files is
explained in a separate section. The CMake build can build the complete
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could that "separate section" be named/referenced here?

Studio 2019. There are also hand-written make files which can be used to build
separate binaries independently. Usage of the hand-written make files is
explained in a separate section. The CMake build can build the complete
repository in fewer steps and supports better integration with various IDEs and
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you find out that it was "fewer steps?"

COMPILING.md Outdated
Comment on lines 51 to 53
- On platforms where installing the Java Development Kit and Maven is
difficult, you can avoid needing these dependencies by not building
JBMC. Just pass `-DWITH_JBMC=OFF` to cmake in step (4) below.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above commands didn't install maven or a JDK! Also, having this item right here is a bit strange for both the ones before and after are about installing operating-system specific dependencies.

COMPILING.md Show resolved Hide resolved
COMPILING.md Show resolved Hide resolved
COMPILING.md Outdated
Comment on lines 45 to 46
You shoud also install [Homebrew](https://brew.sh), after which you can
run `brew install cmake` to install CMake.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also similar to tautshnig's comment below, why is MacOS different in style and arguments to the others. I think it would be better to have single (displayed) comment for each system and let that do it all. If users want to play around, this can (probably) be covered elsewhere. (Note, I'm reviewing by commit, so they may be a little haphazard depending on the commits.)

# Building using hand-written make files.

The rest of this section is split up based on the platform being built on.
Please read the section appropriate for your machine.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"machine" -> "platform"

COMPILING.md Outdated

- Linux
- MacOS X
- Microsoft Visual Studio
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be >=2019, also below should probably indicate MSVS 2015+-?

COMPILING.md Show resolved Hide resolved
In order to indicate that this is the name of the package.
Because "CMake" should be capitalised that way; not "cmake" or "CMAKE".
To distinguish it from the name of the build system as the command
should not be capitalised.
To help users who decide to install Strawberry Perl to do so.
In order to more clearly explain the issue.
Because cygwin is not tested in CI and because this means that we can
list operating systems rather than a mix of operating systems and tool
chains.
@NlightNFotis NlightNFotis merged commit 4aa3c0d into diffblue:develop May 13, 2021
@thomasspriggs thomasspriggs deleted the tas/compiling_docs_refactor branch May 13, 2021 13:53
NlightNFotis added a commit to NlightNFotis/cbmc that referenced this pull request May 17, 2021
Implement some suggestions presented as comments in diffblue#6109 (we
had to merge the PR before we could get a chance to incorporate
them, so we are compensating now) and do some other minor
cleanup of the COMPILING.md file.
jezhiggins pushed a commit to jezhiggins/cbmc that referenced this pull request May 25, 2021
Implement some suggestions presented as comments in diffblue#6109 (we
had to merge the PR before we could get a chance to incorporate
them, so we are compensating now) and do some other minor
cleanup of the COMPILING.md file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants