> On Jan 26, 2017, at 1:23 PM, Gonzalo Garramuño <ggarr...@gmail.com> wrote: > > I currently own an Ubuntu Xenial 14.04.1 LTS box in which I do all my work. > I distribute a binary image viewer. However, recently one of my users > tried to run the viewer on a CentOS 7 distro and found out that that distro > libc and libstdc++ are older and incompatible. > > I would like to compile my program targeting the older libc and libstdc++. > Those files come with symbol version and visibility. Is there an easy way to > do that other than copying the old libraries? > > Any help or hint is appreciated. >
In what way is the stdlib incompatible? Does it have bugs, or is this more a matter of cpp standard support? If you want to enforce/require a certain standard of cpp, for instance, have a look at: https://cmake.org/cmake/help/v3.1/variable/CMAKE_CXX_STANDARD_REQUIRED.html If you want to enforce certain language features, you can consider specifying compile-features: https://cmake.org/cmake/help/v3.1/manual/cmake-compile-features.7.html https://cmake.org/cmake/help/v3.1/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html#prop_gbl:CMAKE_CXX_KNOWN_FEATURES Now, that might still not solve the immediate problem of an old toolchain on Centos7, but at least CMake will make clear to the user what’s missing. For Centos/Redhat specifically, I’ve had good luck with devtoolset for installing/using an updated toolchain: https://www.softwarecollections.org/en/scls/rhscl/devtoolset-3 HTH, Mike Ellery -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake