open-simulation-platform / libcosim

OSP C++ co-simulation library
https://open-simulation-platform.github.io/libcosim
Mozilla Public License 2.0
61 stars 10 forks source link

CMake version requirement is too low #702

Closed kyllingstad closed 9 months ago

kyllingstad commented 2 years ago

Currently the first line of /CMakeLists.txt specifies

cmake_minimum_required(VERSION 3.9)

I've tried building with CMake 3.13, but even this is too low. The generation step fails because libcosim links to targets LibLZMA::LibLZMA, which don't exist. This is because the FindLibLZMA module bundled with these versions of CMake doesn't define it.

Building it with CMake 3.18 works, and a quick look at the release docs indicates that this is the minimum version we should require.

markaren commented 2 years ago

I assumed the Ubuntu 18.04 runner used CMake 3.10, but it actually uses CMake 3.23.2. Anyway, there is no reason to use outdated versions in 2022, and updating only takes a few seconds with pip.

I suggest using at least 3.15 as the minimal. This should have LibLZMA::LibLZMA and will allow usefull updates to the build without breaking compat straight away.