[CMake] Different compiler in sub directory

Nicholas Yue yue.nicholas at gmail.com
Wed Sep 5 04:09:12 EDT 2012


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://au.linkedin.com/in/nicholasyue



More information about the CMake mailing list