@@ -132,22 +132,47 @@ SCIP* scip = model.scip();
132
132
133
133
## Build
134
134
135
+ ### Without Conan
136
+
135
137
We use [ Conan] ( https://conan.io/center/ ) as package manager.
136
138
That is not required! As long as ` find_package(scip CONFIG REQUIRED) ` (and ` find_package(Boost CONFIG REQUIRED) ` for
137
139
the tests) work(s), any kind of dependency management system can be used.
138
140
139
- ### Build & Install
141
+ Build and install:
142
+
143
+ ``` bash
144
+ cmake .
145
+ make ScipPP
146
+ make install
147
+ ```
148
+
149
+ Build and run tests:
150
+
151
+ ``` bash
152
+ cmake -DBUILD_TESTS=ON .
153
+ make tests
154
+ ./test/tests
155
+ ```
156
+
157
+ ### With Conan v2 and CMake v3.19 or later
140
158
141
- Assuming you are using Conan v2 and a CMake version that supports presets (v3.19 and above), run :
159
+ Build and install :
142
160
143
161
``` bash
144
- conan install -of . .
162
+ conan install .
145
163
cmake --preset conan-release .
146
164
cmake --build build/Release --target ScipPP
147
165
cmake --install build/Release
148
166
```
149
167
150
- ### If pre-compiled dependencies are not available
168
+ Build and run tests:
169
+
170
+ ``` bash
171
+ conan install -o with_tests=True .
172
+ cmake --preset conan-release .
173
+ cmake --build build/Release --target tests
174
+ build/Release/test/tests
175
+ ```
151
176
152
177
If your setting of OS, compiler, C++ or stdlib version is one where conan-center does not host pre-compiled binaries,
153
178
add ` --build=missing ` when you run ` conan install ` . The dependencies will then be built from source (don't worry, they
@@ -163,31 +188,31 @@ or try to build locally from sources using the '--build=missing' argument
163
188
change the install-command to
164
189
165
190
``` bash
166
- conan install -of . - -build=missing .
191
+ conan install --build=missing .
167
192
```
168
193
169
- ### If you are using a CMake version without support for presets
194
+ ### With Conan v2 and CMake v3.18 or earlier
195
+
196
+ When CMake presets are not support, use the toolchain file that conan generates.
197
+
198
+ Build and install:
170
199
171
200
``` bash
172
- conan install -of . .
201
+ conan install .
173
202
cmake . -G " Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=./build/Release/generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release
174
203
make ScipPP
175
204
make install
176
205
```
177
206
178
- ### Test
179
-
180
- Using Conan, the option ` with_tests ` has to be set to true.
207
+ Build and run tests:
181
208
182
209
``` bash
183
- conan install -of . - o with_tests=True .
184
- cmake --preset conan-release .
185
- cmake --build build/Release --target testScipPP
186
- ./build/Release/test/testScipPP
210
+ conan install -o with_tests=True .
211
+ cmake . -G " Unix Makefiles " -DCMAKE_TOOLCHAIN_FILE=./build/Release/generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release
212
+ make tests
213
+ ./build/Release/test/tests
187
214
```
188
215
189
- When using purely CMake, add ` -DBUILD_TESTS=ON ` .
190
-
191
216
## Utils
192
217
193
218
Use ` gen_constexpr_parameters ` to transform all SCIP parameters into constexpr ` scippp::params::Param<T> ` objects which
0 commit comments