![]() While the implementation details of GDCM are written using C++98, the fact that Poppler library has been build using the default (implicit) standard version of gcc-6 makes it suddenly a compilation failure for GDCM, since an explicit -std=c++98 is being passed. Let's consider the case where GDCM is using the Poppler library. Defining a c++ standard version for the implementation detail of the library being built.įrom a Debian Maintainer perspective setting explicitly a C++ standard version makes it hard to rebuild a portion of the package archive when a library SONAME is being updated.Defining a c++ standard version for the interface of the library being built.However there are two things that get mixed here: ![]() Mandates explicit -std=c++XY for c++ projects.I am working with my Debian Maintainer hat on, and I was convinced a couple of months back that setting an explicit C++ standard version in cmake within a project was the right way to do, hence my proposal: Update: The following is out of the scope for the question, but since I received a lengthy answer from I feel I need to clarify the need for this. Typically for a project built using g++ 4.8.5 it would add -std=c++11 but for a project build with g++ 6.3.0 it would leave the default (implicit) -std=c++14 Is there a way to say: "Build this project with at least C++11 Standard" in CMake ? ![]() usr/bin/cmake -E cmake_link_script CMakeFiles/foobar.dir/link.txt -verbose=1 usr/bin/c++ -std=c++11 -o CMakeFiles/foobar.dir/ -c /tmp/p/foobar.cxx Building CXX object CMakeFiles/foobar.dir/ However again in this case this forces me to use -std=c++11 eventhough by default g++ 6.3.0 default to -std=c++14 (technically -std=gnu++14): $ c++ -dumpversion Target_compile_features(foobar PRIVATE cxx_nullptr) I thought that I could just do instead: $ cat CMakeLists.txt However this does not clearly fit my needs, I'd rather states that I need at least c++11. CMake has a nice framework for setting and defining an explicit value for the C++ standard, typically: set(CMAKE_CXX_STANDARD 11)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |