Skip to content

fix: update the c++ version selection process #511

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SGSSGene
Copy link
Contributor

The c++ version should be set via target_compile_features(SQLiteCpp PUBLIC cxx_std_11)
This only sets this as a minimum version for this target, and not all targets.

@SRombauts SRombauts self-assigned this May 26, 2025
@SRombauts
Copy link
Owner

Hey @SGSSGene, that sounds like a nice improvement as well, thanks for taking the time to provide the PR!

@@ -213,6 +204,9 @@ endif()
# add sources of the wrapper as a "SQLiteCpp" static library
add_library(SQLiteCpp ${SQLITECPP_SRC} ${SQLITECPP_INC} ${SQLITECPP_DOC} ${SQLITECPP_SCRIPT})

# set minimum version to c++11
target_compile_features(SQLiteCpp PUBLIC cxx_std_11)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cxx_std_11 compiler meta-feature is not available CMake 3.5 (which was the minimal version until now, see line 7 cmake_minimum_required(VERSION 3.5))

It was introduced in 3.8, CMake 3.8 release notes

Could you please also update the minimum version?
Thanks!

@SGSSGene
Copy link
Contributor Author

@SRombauts: All changes that we currently do downstream in the OpenMS project :-)

What CMake version is suitable?
This is also why I asked here, what the current supported platforms are #510
I would like to bump the CMake version up, as far possible.

@SRombauts
Copy link
Owner

I would like to bump the CMake version up, as far possible.
My strategy up to know regarding supported platforms has always be to try to keep it backward compatible as long as possible.
Her for instance I would just update from 3.5 to 3.8.

Then, if you have any other pull request with more changes requiring another bump, I would evaluate that again.
But if you have any specific version in mind with a good reason I am happy to consider it instead.

SGSSGene added 2 commits June 6, 2025 11:12
The c++ version should be set via `target_compile_features(SQLiteCpp
PUBLIC cxx_std_11)`
This only sets this as a minimum version for this target, and not all
targets.
@SGSSGene SGSSGene force-pushed the fix/modern_cpp_version_selection branch from 2839628 to 21c371a Compare June 6, 2025 09:14
@SGSSGene SGSSGene requested a review from SRombauts June 7, 2025 12:10
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