-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from powsybl/macos
Add support for MacOSX
- Loading branch information
Showing
3 changed files
with
55 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
# Linux build | ||
# powsybl-math-native | ||
This project is the C++ implementation of [powsybl-math](https://github.com/powsybl/powsybl-core) `SparseMatrix` class, relying on SuiteSparse project. | ||
|
||
Everything is automated on Linux using a Dockerfile. To build Docker image, run the following command (proxy related arguments are optionals). | ||
## Requirements | ||
To build `powsybl-math-native`, you need the followind dependencies: | ||
- [CMake](https://cmake.org/download) | ||
- C++ compiler (gcc, clang or [Visual Studio](https://visualstudio.microsoft.com/fr/vs/features/cplusplus/)) | ||
- Java (8 or later) | ||
- [Python](https://www.python.org/downloads) (2.7 or later), with [Six](https://pypi.org/project/six/) module | ||
|
||
```bash | ||
docker build -t powsybl-math-native --build-arg proxy_host=<HOST> --build-arg proxy_port=<PORT> --build-arg proxy_username=<USER> --build-arg proxy_password=<PWD> . | ||
``` | ||
|
||
Once docker image has been built, we can retrieved native jar: | ||
## Compilation | ||
|
||
```bash | ||
docker run --name powsybl-math-native-tmp powsybl-math-native /bin/true | ||
docker cp powsybl-math-native-tmp:/powsybl-math-native/build/powsybl-math-linux_64-1.0.0.jar /tmp | ||
docker rm powsybl-math-native-tmp | ||
### Linux or MacOS | ||
To build `powsybl-math-native`, run the following commands: | ||
``` | ||
|
||
# Windows build | ||
|
||
Following components have to be installed: | ||
|
||
- Git for Windows: https://gitforwindows.org/ | ||
- CMake >= 3.1: https://cmake.org/download/. It must be added to the path. | ||
- Python 2.7 for Windows: https://www.python.org/downloads/windows/ | ||
- Python27 must be added to the path | ||
- Six module must be installed. In a cmd.exe shell run the following command: | ||
```bash | ||
python -m pip install six | ||
``` | ||
- Visual studio c++ compiler community edition: https://visualstudio.microsoft.com/fr/vs/features/cplusplus/ | ||
|
||
# Jar installation | ||
|
||
To install jars in local repository: | ||
|
||
```bash | ||
mvn install | ||
$> git clone https://github.com/powsybl/powsybl-math-native.git | ||
$> cd powsybl-math-native | ||
$> mkdir build | ||
$> cd build | ||
$> cmake .. | ||
$> make | ||
$> cd .. | ||
$> mvn install | ||
```` | ||
### Windows | ||
To build `powsybl-math-native`, run the following commands: | ||
``` | ||
$> git clone https://github.com/powsybl/powsybl-math-native.git | ||
$> cd powsybl-math-native | ||
$> mkdir build | ||
$> cd build | ||
$> cmake .. -G "NMake Makefiles" | ||
$> nmake | ||
$> cd .. | ||
$> mvn install | ||
```` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters