It's better to use ExternalProject.cmake to configure part of your solution with different compiler.<br><br><div class="gmail_quote">On Wed, Sep 5, 2012 at 12:09 PM, Nicholas Yue <span dir="ltr"><<a href="mailto:yue.nicholas@gmail.com" target="_blank">yue.nicholas@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I have a need to build different parts of a project using different version of g++<br>
<br>
If I set the top level CMakeLists.txt compiler<br>
<br>
via -DCMAKE_CXX_COMPILER=/usr/<u></u>local/bin/g++<br>
<br>
and subsequently use another compiler<br>
<br>
SET ( CMAKE_CXX_COMPILER "/usr/bin/g++" )<br>
<br>
will the compiler being set only scoped within that directory (when I use ADD_SUBDIRECTORY) or would that become global for other projects later...<br>
<br>
Regards<br>
<br>
-- <br>
Nicholas Yue<br>
Graphics - RenderMan, Visualization, OpenGL, HDF5<br>
Custom Dev - C++ porting, OSX, Linux, Windows<br>
Management - Recruitment, career management<br>
<a href="http://www.proceduralinsight.com/" target="_blank">http://www.proceduralinsight.<u></u>com/</a><br>
<a href="http://au.linkedin.com/in/nicholasyue" target="_blank">http://au.linkedin.com/in/<u></u>nicholasyue</a><br>
<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/<u></u>CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/<u></u>listinfo/cmake</a><br>
</blockquote></div><br>