scapix
scapix copied to clipboard
Support for C++20 does not work with CMAKE_CXX_STANDARD
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.
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)
New version v1.0.43 with this fix has been released: cmodule releases