<div dir="ltr">Hello,<div><br></div><div>I use a bash script, like this for devtoolset-6.</div><div><br></div><div><a href="https://github.com/devsim/devsim/blob/master/scripts/setup_centos_6.sh">https://github.com/devsim/devsim/blob/master/scripts/setup_centos_6.sh</a> <br></div><div><br></div><div>Regards,</div><div><br></div><div>Juan</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 20, 2019 at 10:39 AM David Aldrich <<a href="mailto:david.aldrich.ntml@gmail.com">david.aldrich.ntml@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">My Centos 7.6 machine has CMake 3.13.5 and g++ 4.8.5 installed:<div><br></div><div>$ /usr/bin/x86_64-redhat-linux-g++ --version<br>x86_64-redhat-linux-g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)<br></div><div><br></div><div>I have a very simple CMakeLists.txt:</div><div><br></div><div>cmake_minimum_required(VERSION 3.5 FATAL_ERROR)<br>project(hello_world LANGUAGES CXX)<br><br>add_executable(hello_world "")<br><br>target_sources(hello_world<br> PRIVATE<br> main.cpp<br> Message.hpp<br> Message.cpp)<br></div><div><br></div><div>I also have Redhat Developer Toolset 7 installed which I can enable in my bash shell:</div><div><br></div>$ scl enable devtoolset-7 bash<br>$ which g++<br>/opt/rh/devtoolset-7/root/usr/bin/g++<br>$ g++ --version<br>g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)<div><br></div><div>How can I get CMake to use the later version of g++ instead of 4.8.5?</div><div><br></div></div>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div>