Skip to content

Extend forward compatibility to v4.0 of CMake#1228

Closed
vadz wants to merge 1 commit intoSOCI:masterfrom
vadz:cmake-v4.0
Closed

Extend forward compatibility to v4.0 of CMake#1228
vadz wants to merge 1 commit intoSOCI:masterfrom
vadz:cmake-v4.0

Conversation

@vadz
Copy link
Copy Markdown
Member

@vadz vadz commented Apr 9, 2025

This is required to avoid build errors about CMake < 3.5 not being supported any longer.

This is required to avoid build errors about CMake < 3.5 not being
supported any longer.
@vadz
Copy link
Copy Markdown
Member Author

vadz commented Apr 9, 2025

@Krzmbrzl Is this the right way to avoid

CMake Error at CMakeLists.txt:9 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

?

@Krzmbrzl
Copy link
Copy Markdown
Contributor

Krzmbrzl commented Apr 9, 2025

Yes. Though with our setup, we shouldn't run into this specific issue any time soon even without the change

@vadz
Copy link
Copy Markdown
Member Author

vadz commented Apr 9, 2025

Yes. Though with our setup, we shouldn't run into this specific issue any time soon even without the change

Err. Not only we risk running into this, but we already did, which is why I made this change. But it doesn't help, we still get the error, see e.g. this build.

I guess I'll have to build my own CMake 4.0 as it's not in Debian yet (well, only in experimental...) to see how to avoid it.

@Krzmbrzl
Copy link
Copy Markdown
Contributor

The error is not from SOCI but from SQLite which we build ourselves on the Windows CI. Hence the error persisting after changing the SOCI files.

To fix it, the CMakeLists.txt file of SQLite needs to be patched. Presumably upgrading to a newer SQLite release would solve the issue as well (and with less effort)

@vadz
Copy link
Copy Markdown
Member Author

vadz commented Apr 10, 2025

Oops, you're right, of course, sorry for not noticing this.

Unfortunately we use some non-official SQLite version with CMake tackled on top of it for the AppVeyor builds, so updating it is not simple.

I'd like to add SQLite as submodule to SOCI and add support for building it as part of it, as this would ensure that we always have at least one functional backend. I'll try to do this instead...

@vadz vadz closed this Apr 10, 2025
@vadz vadz deleted the cmake-v4.0 branch April 10, 2025 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants