scapix icon indicating copy to clipboard operation
scapix copied to clipboard

Support for C++20 does not work with CMAKE_CXX_STANDARD

Open dexpota opened this issue 4 years ago • 2 comments

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.

dexpota avatar Dec 20 '21 10:12 dexpota

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 avatar Sep 13 '23 14:09 Boris-Rasin

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

Boris-Rasin avatar Oct 21 '23 01:10 Boris-Rasin