Changes
Page history
Update compilation
authored
Jan 26, 2018
by
Rémy Mozul
Show whitespace changes
Inline
Side-by-side
compilation.md
View page @
5d3e0b69
# Compilation #
# Compilation #
After downloading and uncompressing you must have the
`lmgc90_user`
directory somewhere. Inside, you should have the following
After downloading and uncompressing you must have the
`lmgc90_user
_xxx
`
directory somewhere. Inside, you should have the following
subdirectories:
subdirectories:
*
*src*
: the sources of LMGC90 software
*
*src*
: the sources of LMGC90 software
*
*examples*
: the user examples working with the sources
*
*examples*
: the user examples working with the sources
*
*manuals*
: a list of manuals/documentation for the software in pdf format
*
*manuals*
: a list of manuals/documentation for the software in pdf format
*
*docs*
: the html documentation generated from the sources
*
*docs*
: the html documentation generated from the sources
*
*build*
: (windows only) the precompiled binary of LMGC90 software
*
*build*
: (empty) where to build the LMGC90 libraries
Then depending on your operating system follow the directions:
*
[Unix/MacOs] (#compile)
*
[Windows] (#precompiled)
If an error arises during the compilation step please first check if there is not a solution
If an error arises during the compilation step please first check if there is not a solution
in the
[
FAQ
](
Faq#compile_error
)
in the
[
FAQ
](
Faq#compile_error
)
## <a name=compile> Unix and MacOs </a> ##
You must run a set of commands from the terminal to build LMGC90 software for your system.
You must run a set of commands from the terminal to build LMGC90 software for your system.
Thus open a terminal and go to your
`lmgc90_user`
directory.
Thus open a terminal and go to your
`lmgc90_user
_xxx
`
directory.
Run the following commands:
Run the following commands:
```
shell
```
shell
mkdir
build
cd
build
cd
build
cmake ..
cmake ..
make
make
...
@@ -56,7 +49,7 @@ Our policy is to not mess with default system paths. So instead we advise to
...
@@ -56,7 +49,7 @@ Our policy is to not mess with default system paths. So instead we advise to
use an environment variable to add to python the path to our build directory.
use an environment variable to add to python the path to our build directory.
In general adding the following lines to your
*.bashrc*
(Linux) or
*.profile*
(MacOS)
In general adding the following lines to your
*.bashrc*
(Linux) or
*.profile*
(MacOS)
file does the trick. Of course you have to replace
*mysourcepath*
by the path to
file does the trick. Of course you have to replace
*mysourcepath*
by the path to
your own
`lmgc90_user`
directory (
in the example above
`~/Desktop/LMGC90/lmgc90_user/`
).
your own
`lmgc90_user
_xxx
`
directory (
something like
`/users/name/LMGC90/lmgc90_user_xxx/`
and replacing
`xxx`
by the version you downloaded
).
```
shell
```
shell
if
[
-z
${
PYTHONPATH
}
]
;
then
if
[
-z
${
PYTHONPATH
}
]
;
then
export
PYTHONPATH
=
mysourcepath/build
export
PYTHONPATH
=
mysourcepath/build
...
@@ -66,15 +59,6 @@ fi
...
@@ -66,15 +59,6 @@ fi
export
PATH
=
${
PATH
}
:mysourcepath/src/addons
export
PATH
=
${
PATH
}
:mysourcepath/src/addons
```
```
## <a name=precompiled> Windows </a> ##
Start the
`Spyder`
program. Then click on the upper line
`tools`
and
`PYTHONPATH manager`
.
Then click
`Add a path`
on lower left corner and select the path to the
`build`
directory
of the previously unzipped package (
*.../lmgc90_user/build*
).
Finally, so that the previous step is taken into account in your current environment, simply restart
`Spyder`
program.
****
****
|
[
back
](
./Download_and_install
)
|
[
home
](
./Home
)
|
[
next
](
./First_steps
)
|
|
[
back
](
./Download_and_install
)
|
[
home
](
./Home
)
|
[
next
](
./First_steps
)
|
...
...
...
...