Skip to content
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

Support for C++20 does not work with CMAKE_CXX_STANDARD #31

Open
dexpota opened this issue Dec 20, 2021 · 2 comments
Open

Support for C++20 does not work with CMAKE_CXX_STANDARD #31

dexpota opened this issue Dec 20, 2021 · 2 comments

Comments

@dexpota
Copy link

dexpota commented Dec 20, 2021

scapix does not use the same C++ standard version of the project when the version is set with CMAKE_CXX_STANDARD. The following snippet is what I use to set the compiler C++ version.

set(CMAKE_CXX_STANDARD 20)

The issue can be fixed by setting the compiler version with the following snippet.

 target_compile_features(<target> PUBLIC cxx_std_20)

In my opinion, scapix should recognize the compiler version when is set with CMAKE_CXX_STANDARD.

Boris-Rasin added a commit that referenced this issue Sep 13, 2023
@Boris-Rasin
Copy link
Member

Scapix now recognizes these options, if set before find_package(Scapix):

set(CMAKE_CXX_STANDARD 20) # 23, 26, etc.
set(CMAKE_CXX_STANDARD_REQUIRED ON)

@Boris-Rasin
Copy link
Member

New version v1.0.43 with this fix has been released: cmodule releases

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

No branches or pull requests

2 participants