Skip to content

Commit

Permalink
Add fixes to support CMake 3.16
Browse files Browse the repository at this point in the history
  • Loading branch information
hedtke committed Jul 25, 2023
1 parent 7c56db8 commit d8d8c74
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.16)
project(ScipPP LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)

Expand Down Expand Up @@ -38,6 +38,7 @@ target_include_directories(ScipPP PUBLIC include)
target_link_libraries(ScipPP PUBLIC scip::scip)

# install
include(GNUInstallDirs)
install(TARGETS ScipPP LIBRARY DESTINATION lib)
set_target_properties(ScipPP PROPERTIES PUBLIC_HEADER "${SCIPPP_HDR}")
install(TARGETS ScipPP PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/scippp)
Expand Down
11 changes: 11 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ the tests) work(s), any kind of dependency management system can be used.

### Build & Install

Assuming you are using Conan v2 and a CMake version that supports presets (v3.19 and above), run:

```bash
conan install -of . .
cmake --preset conan-release .
Expand All @@ -171,6 +173,15 @@ change the install-command to
conan install -of . --build=missing .
```

### If you are using a CMake version without support for presets

```bash
conan install -of . .
cmake . -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=./build/Release/generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release
make ScipPP
make install
```

### Test

```bash
Expand Down

0 comments on commit d8d8c74

Please sign in to comment.