Skip to content

Commit c8618cc

Browse files
committed
Merge branch 'master' of github.com:SGpp/SGpp_Example_Application_CMake
2 parents d2a0e19 + 8e52b1e commit c8618cc

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,42 @@
1+
# SGpp_Example_Application_CMake
2+
13
## Purpose of this repository
24

3-
This repository is meant as a starting point for people who want to use SG++ in a project of their own.
5+
This repository is meant to serve as a starting point for people who want to use [SG++](https://github.com/SGpp/SGpp) in a project of their own.
46
It demonstrates how to use git submodules to include SG++ as an external dependency and how to use cmake
57
to both build SG++ and the project itself.
68

79
## How to build
810

9-
#### 1. Clone repository
11+
### 1. Clone repository
1012
> git clone https://github.com/SGpp/SGpp_Example_Application_CMake.git my_example
1113
1214
> cd my_example
13-
#### 2. Checkout SGpp submodule
15+
### 2. Checkout SGpp submodule
1416
> git submodule update --init external_dependencies/SGpp
1517
1618
The submodule is not checked out during a normal git clone. Thus, we do it this way.
17-
#### 3. Move to build directory
19+
20+
### 3. Move to build directory
1821
> mkdir -p build
1922
2023
> cd build
2124
2225
We will use a subfolder within the project root as a build directory. Of course this can be changed to another directory.
23-
#### 4. Run cmake
26+
27+
### 4. Run cmake
2428
> cmake ..
2529
2630
This command will both configure the project as well as build SG++.
2731
Note that with this setup SG++ will only be built when the cmake command is called.
2832
Thus, if the SG++ submodule itself is set to another commit, the cmake command needs to be run again.
2933

30-
#### 5. Run make
34+
### 5. Run make
3135
> make
3236
3337
This command will build the actual example application. It will not build SG++ again in order to save compilation time.
3438

35-
## How to modify the build
39+
## How to modify the SG++ build
3640
The SG++ version used can simply be changed by going to the (checked out) submodule folder external_dependencies/SGpp and changing the commit there as one would in a normal git repository.
3741

3842
Most likely you want to change the configuration used by SG++, for example by deactivating modules you do not need or by activating a wrapper for another language like Python.
@@ -43,9 +47,9 @@ To deactivate a module, edit the scons command, which is called in the CMakelist
4347
To see all ways to configure scons for SG++, go to the (checked out) submodule directory and run
4448
> scons -h
4549
46-
or visit [SG++ Github page](https://github.com/SGpp/SGpp) for more information.
50+
or visit the [SG++ Github page](https://github.com/SGpp/SGpp) for more information.
4751

4852

4953
## About the utilized example
5054
The application itself shows how to integrate functions in SG++, using both direct integration of a sparse grid function and the use of Monte Carlo integration.
51-
It is heavily based on the SG++ example [quadrature.cpp](https://github.com/SGpp/SGpp/blob/master/base/examples/quadrature.cpp). However, unlike the quadrature example alone, this repository further shows how to build your own projects utilizing SG++.
55+
It is heavily based on the SG++ example [quadrature.cpp](https://github.com/SGpp/SGpp/blob/master/base/examples/quadrature.cpp). However, unlike the quadrature example alone, this repository further shows how to build your own projects utilizing SG++.

0 commit comments

Comments
 (0)