Skip to content

Commit 24eeeea

Browse files
committed
update
1 parent 889c0a2 commit 24eeeea

File tree

3 files changed

+23
-15
lines changed

3 files changed

+23
-15
lines changed

cmake/README.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# HiGHS CMake Build Instructions
1+
# HiGHS CMake Build Instructions
22

33
| OS | C++ | Fortran | Python | CSharp Example | .NET |
44
|:-------- | :---: | :------: | :----: | :----: | :----: |
@@ -57,7 +57,7 @@
5757
- [CMake Options](#cmake-options)
5858
- [Integrating HiGHS in your CMake Project](#integrating-highs-in-your-cmake-project)
5959

60-
## Introduction
60+
## Introduction
6161

6262
HiGHS can be built from source using CMake: <http://www.cmake.org/>. CMake works by generating native Makefiles or build projects that can be used in the compiler environment of your choice.
6363

@@ -69,7 +69,7 @@ You'll need:
6969
* `CMake >= 3.15`.
7070
* A C++11 compiler
7171

72-
## Supported compilers
72+
## Supported compilers
7373

7474
Here is a list of the supported compilers:
7575

@@ -84,42 +84,48 @@ To build the C++ library and executable run
8484

8585
``` bash
8686
cd HiGHS
87-
cmake -S. -B build
87+
cmake -S. -B build
8888
cmake --build build --parallel
8989
```
9090

9191
This generates HiGHS in the `build` directory and creates the [executable](@ref Executable) `build/bin/highs`, or `build/Release/bin/highs.exe` on Windows. To perform a quick test to see whether the compilation was successful, run `ctest` from within the build folder.
9292

9393
``` bash
94-
ctest
94+
ctest
9595
```
9696

9797
On Windows, the configuration type must be specified:
9898
``` bash
9999
ctest -C Release
100100
```
101101

102+
The default compiler for HiGHS on Windows is MSVC, to use `mingw64` some additional cmake flags are required:
103+
``` bash
104+
cmake -D CMAKE_CXX_COMPILER=g++ -D CMAKE_C_COMPILER=gcc -G "MinGW Makefiles" -S. -B build
105+
```
106+
107+
102108
## Install
103109

104110
The default installation location may need administrative
105111
permissions. To install, after building and testing, run
106112

107113
``` bash
108-
cmake --install build
114+
cmake --install build
109115
```
110116

111-
form the root directory.
117+
form the root directory.
112118

113119
To install in a specified installation directory run CMake with the
114120
`CMAKE_INSTALL_PREFIX` flag set:
115121

116122
``` bash
117-
cmake -S. -B build -DCMAKE_INSTALL_PREFIX=/path/to/highs_install
123+
cmake -S. -B build -DCMAKE_INSTALL_PREFIX=/path/to/highs_install
118124
cmake --build build --parallel
119125
cmake --install build
120126
```
121127

122-
## Windows
128+
## Windows
123129

124130
By default, CMake builds the debug version of the binaries. These are generated in a directory `Debug`. To build a release version, add the option `--config Release`
125131

@@ -164,7 +170,7 @@ For example, to generate build files in a new
164170
subdirectory called 'build', run:
165171

166172
```shell
167-
cmake -S. -Bbuild
173+
cmake -S. -Bbuild
168174
```
169175
and then build with:
170176

@@ -191,11 +197,11 @@ Following is a list of available options:
191197
cmake -S. -Bbuild -LH
192198
``` -->
193199

194-
HiGHS can be integrated into other CMake-based projects.
200+
HiGHS can be integrated into other CMake-based projects.
195201

196202
# Integrating HiGHS in your CMake Project
197203

198-
If you already have HiGHS installed on your system, you can use `find_package()` to include HiGHS in your C++ CMake project.
204+
If you already have HiGHS installed on your system, you can use `find_package()` to include HiGHS in your C++ CMake project.
199205

200206
```
201207
project(LOAD_HIGHS LANGUAGES CXX)
@@ -208,7 +214,7 @@ add_executable(main main.cpp)
208214
target_link_libraries(main highs::highs)
209215
```
210216

211-
The line
217+
The line
212218
```
213219
set(HIGHS_DIR path_to_highs_install/lib/cmake/highs)
214220
```
@@ -217,7 +223,7 @@ adds the HiGHS installation path to `HIGHS_DIR`. This is equivalent to building
217223
cmake -DHIGHS_DIR=path_to_highs_install/lib/cmake/highs ..
218224
```
219225

220-
Alternatively, if you wish to include the code of HiGHS within your project, FetchContent is also available as follows:
226+
Alternatively, if you wish to include the code of HiGHS within your project, FetchContent is also available as follows:
221227

222228
```
223229
project(LOAD_HIGHS LANGUAGES CXX)

docs/src/interfaces/csharp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The nuget package contains runtime libraries for
2929
* `macos-x64`
3030
* `macos-arm64`
3131

32-
Details for building locally can be found in `nuget/README.md`.
32+
Details for building locally can be found in `nuget/README.md`. Many thanks to Markus-Ludwig Wermer and the team at MENTZ GmbH for the NuGet packaging support!
3333

3434
#### C# API
3535

nuget/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,5 @@ dotnet pack -c Release /p:Version=$version
3434
```
3535

3636
At the moment version is set manually.
37+
38+
Many thanks to Markus-Ludwig Wermer and the team at MENTZ GmbH for the NuGet packaging support!

0 commit comments

Comments
 (0)