While updating my version of DCMTK I noticed that the default value for CMake flag DCMTK_ENABLE_CXX11 is now INFERRED.
Can someone tell me what that means in terms of C++ 11 usage within the toolkit? Also, what are the supported values for this and related CXX flags?
Thanks.
CXX11 Inferred in latest snapshots
Moderator: Moderator Team
-
- OFFIS DICOM Team
- Posts: 318
- Joined: Mon, 2014-03-03, 09:51
- Location: Oldenburg, Germany
Re: CXX11 Inferred in latest snapshots
New versions of CMake now natively support detecting the supported C++ standard. This means you can now use the official way of setting CXX_STANDARD and related variables to chose a C++ version while building DCMTK. DCMTK_ENABLE_CXX11 exists for legacy reasons, e.g. if you have a build script that sets it to ON, this will still work, but if you decide to use the CXX_STANDARD variable it will infer the value based on the information that CMake provides after running the appropriate tests.
Re: CXX11 Inferred in latest snapshots
And what is the recommended value for CXX_STANDARD? 11, 14 or 17 ?
-
- OFFIS DICOM Team
- Posts: 318
- Joined: Mon, 2014-03-03, 09:51
- Location: Oldenburg, Germany
Re: CXX11 Inferred in latest snapshots
Well, 20, of course! It will become 23 in a few years, though .
What I mean to say is: this depends on your project. E.g. if you are using C++17 in your code, set it to 17 for building a compatible DCMTK and to enable some features that require it. If this does not apply, e.g. if you are a package maintainer for a Linux distribution you should instead look at other packages, e.g. if the QT libraries are built with C++17 support, then perhaps that should also apply for DCMTK.
What I mean to say is: this depends on your project. E.g. if you are using C++17 in your code, set it to 17 for building a compatible DCMTK and to enable some features that require it. If this does not apply, e.g. if you are a package maintainer for a Linux distribution you should instead look at other packages, e.g. if the QT libraries are built with C++17 support, then perhaps that should also apply for DCMTK.
Re: CXX11 Inferred in latest snapshots
I hear you .
Thanks Jan.
Thanks Jan.
Who is online
Users browsing this forum: No registered users and 1 guest