[CMake] Different compiler in sub directory

Yuri Timenkov yuri at timenkov.ru
Wed Sep 5 10:00:07 EDT 2012


It's better to use ExternalProject.cmake to configure part of your solution
with different compiler.

On Wed, Sep 5, 2012 at 12:09 PM, Nicholas Yue <yue.nicholas at gmail.com>wrote:

> Hi,
>
>     I have a need to build different parts of a project using different
> version of g++
>
>     If I set the top level CMakeLists.txt compiler
>
>         via -DCMAKE_CXX_COMPILER=/usr/**local/bin/g++
>
>     and subsequently use another compiler
>
>         SET ( CMAKE_CXX_COMPILER "/usr/bin/g++" )
>
>     will the compiler being set only scoped within that directory (when I
> use ADD_SUBDIRECTORY) or would that become global for other projects
> later...
>
> Regards
>
> --
> Nicholas Yue
> Graphics - RenderMan, Visualization, OpenGL, HDF5
> Custom Dev - C++ porting, OSX, Linux, Windows
> Management - Recruitment, career management
> http://www.proceduralinsight.**com/ <http://www.proceduralinsight.com/>
> http://au.linkedin.com/in/**nicholasyue<http://au.linkedin.com/in/nicholasyue>
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/**
> opensource/opensource.html<http://www.kitware.com/opensource/opensource.html>
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/**CMake_FAQ<http://www.cmake.org/Wiki/CMake_FAQ>
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/**listinfo/cmake<http://www.cmake.org/mailman/listinfo/cmake>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120905/08a72c35/attachment.htm>


More information about the CMake mailing list