You might consider using the new ExternalProject module and the ExternalProject_Add function to build one as a separate stand-alone project.
See this article about using ExternalProject in the latest "The Source" newsletter on pp. 14-17: http://kitware.com/products/archive/kitware_quarterly1009.pdf HTH, David On Tue, Dec 8, 2009 at 12:43 PM, Alexander Neundorf <a.neundorf-w...@gmx.net > wrote: > On Tuesday 08 December 2009, RĂ¼diger Ranft wrote: > > Hi all, > > > > I need to use two different C compilers in a project, because this > > project consists of both PC software and micro controller firmware. Is > > there a way to use cmake to generate Makefiles which call different > > compilers, (or to hard-code a second one, since the PC software can be > > developed with diferent compilers, but the MC software is fixed to one > > special vendor-provided)? > > In general this is not supported (since all test results in CMakeCache.txt > etc. are invalid for the other compiler). > But if you know what you are doing, it should be possible to just set the > COMPILE-variables in the subdirectory where the sources for your > microcontroller are manually to how they should look like for this > compiler. > try_compile() tests etc. will not work properly there. > This is basically what is done in cmake/Modules/UseEcos.cmake, but this is > already a few years old and today I consider this actually a hack. > > Alex > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > 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 > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake >
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at 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 Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake