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

Modernize cmake #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,13 @@ You can also install the library from source using CMake.
```bash
# clone gcem from GitHub
git clone https://github.com/kthohr/gcem ./gcem
cd cgem

# make a build directory
cd ./gcem
mkdir build
cd build
# configure
cmake -H. -Bbuild -DCMAKE_INSTALL_PREFIX=/gcem/install/location

# generate Makefiles and install
cmake .. -DCMAKE_INSTALL_PREFIX=/gcem/install/location
make install
# build and install
cmake --build build --target install
```
For example, `/gcem/install/location` could be `/usr/local/`.

Expand All @@ -99,14 +97,11 @@ make

With CMake, the option `GCEM_BUILD_TESTS=1` generates the necessary Makefiles to build the test suite.
```bash
cd ./gcem
mkdir build
cd gcem
cmake -H. -Bbuild -DGCEM_BUILD_TESTS=1 -DCMAKE_INSTALL_PREFIX=/gcem/install/location
cmake --build build --target gcem_tests

cd build
cmake ../ -DGCEM_BUILD_TESTS=1 -DCMAKE_INSTALL_PREFIX=/gcem/install/location
make gcem_tests

cd tests
cd build/tests
./exp.test
```

Expand Down