-
Notifications
You must be signed in to change notification settings - Fork 24
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
Added a command line installation section to the README. #72
Conversation
The example command sequence worked on Linux login04 3.10.0-1160.36.2.el7.x86_64 schrodinger#1 SMP Thu Jul 8 02:53:40 UTC 2021 x86_64 GNU/Linux Red Hat Enterprise Linux Server release 7.9 (Maipo) cmake version 3.17.2 gcc version 9.1.0 (GCC) boost/1.72.0
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.
Hi Scott, sorry for the delay in reviewing this. Thank you very much for your contribution. I have added a few suggestions below.
README.md
Outdated
building is via [Make](https://en.wikipedia.org/wiki/Make_(software)); | ||
and testing can be performed by running a custom built program. Here is an | ||
example command sequence: |
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.
CMake can be instructed to generate the build instructions for different build generators (see the -G
option in the CMake documentation: https://cmake.org/cmake/help/latest/manual/cmake.1.html). make
is just the default option (e.g., make
won't be available on windows systems).
building is via [Make](https://en.wikipedia.org/wiki/Make_(software)); | |
and testing can be performed by running a custom built program. Here is an | |
example command sequence: | |
and testing can be performed by running a custom built program. Here is an | |
example command sequence building via [Make](https://en.wikipedia.org/wiki/Make_(software)) and the `gcc` compiler: |
README.md
Outdated
```bash | ||
git clone git@github.com:schrodinger/maeparser.git maeparser | ||
cd maeparser | ||
mkdir build | ||
cd build | ||
export CC=gcc | ||
export VERBOSE=yes | ||
cmake `pwd/..` | ||
make | ||
test/unittest | ||
``` |
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.
```bash | |
git clone git@github.com:schrodinger/maeparser.git maeparser | |
cd maeparser | |
mkdir build | |
cd build | |
export CC=gcc | |
export VERBOSE=yes | |
cmake `pwd/..` | |
make | |
test/unittest | |
``` | |
```bash | |
# "clone" a local copy of the code from github | |
$ git clone git@github.com:schrodinger/maeparser.git maeparser | |
# set up the build configuration | |
$ cd maeparser | |
$ mkdir build | |
$ cd build | |
$ export CC=gcc | |
$ export VERBOSE=yes | |
$ cmake `pwd/..` | |
# Run the build | |
$ make | |
# Run the tests | |
$ test/unittest |
README.md
Outdated
Defining CC ensures that the first | ||
[compiler](https://en.wikipedia.org/wiki/Compiler) in one's | ||
[PATH](https://en.wikipedia.org/wiki/PATH_(variable)) is used, | ||
and defining VERBOSE enables viewing the gory details of compiling and | ||
[linking](https://en.wikipedia.org/wiki/Linker_(computing)) | ||
that will be necessary to reproduce when one builds one's own program | ||
that uses the maeparser library. |
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.
Some comments here:
-
There might be other compilers installed, but setting CC requires one specific compiler, not necessarily in the PATH (
CC
can also be specified with an absolute path to the compiler, and in such case, it doesn't have to be in the PATH variable). -
The "gory details" are not required to use maeparser in one's code (the default output level is enough for that), but they are useful if there's trouble.
Defining CC ensures that the first | |
[compiler](https://en.wikipedia.org/wiki/Compiler) in one's | |
[PATH](https://en.wikipedia.org/wiki/PATH_(variable)) is used, | |
and defining VERBOSE enables viewing the gory details of compiling and | |
[linking](https://en.wikipedia.org/wiki/Linker_(computing)) | |
that will be necessary to reproduce when one builds one's own program | |
that uses the maeparser library. | |
Defining CC ensures that the specified | |
[compiler](https://en.wikipedia.org/wiki/Compiler) is used in the build | |
(in the example, it will be the first instance of `gcc` in one's [PATH](https://en.wikipedia.org/wiki/PATH_(variable))), | |
and defining VERBOSE enables viewing the gory details of compiling and | |
[linking](https://en.wikipedia.org/wiki/Linker_(computing)) | |
that will be necessary for debugging or reporting issues if the build fails. |
Hi Ric, Happy New Year ! I may be living in a different universe than you all. The comments among the commands are ok, but the dollar signs will thwart simple cut-n-pasting --- a Good point on CC. Note that it is "the gory details of compiling", which the VERBOSE=1 option to make emits, not a high verbosity of maeparser that i was advocating; the former were necessary for me to see to get a simple test built. I'll tweak. scott |
I pushed the edits. |
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.
Lookss good to me. @d-b-w, would you mind having a look too?
Trying to skate the line between "what is idiomatic" and "what is useful to someone new to this tool". Hope it helps. Thanks for helping us out with this, btw.
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.
Thanks for helping us with our documentation!
README.md
Outdated
[Unix-like](https://en.wikipedia.org/wiki/Unix-like) | ||
operating system follows a typical configure, build, and test procedure. | ||
Configuration is via [CMake](https://en.wikipedia.org/wiki/CMake), | ||
and testing can be performed by running a custom built program. Here is an |
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.
Please remove the line "and testing can be performed by running a custom built program". The project uses the idiomatic make test
or ctest
command to run all unit tests.
README.md
Outdated
make | ||
|
||
# Run the custom testing | ||
test/unittest |
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.
ctest
or make test
test/unittest
is currently valid, but we will probably add future tests. ctest
and make test
are pretty standard mechanisms for running unit tests in a C++ world. (see, for example: https://github.com/cpp-best-practices/cpp_starter_project#running-the-tests)
cd maeparser | ||
mkdir build | ||
cd build | ||
export CC=gcc |
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.
I'm surprised that this was needed. I'd expect that either:
- cmake figures out which compiler you want
- or you're in a more advanced build environment, in which case I'd expect the container or build environment to set this.
Thanks for this, @sbrozell ! |
See #71 .