Thank you!<br>It  worked.<br><br>Taesoo<br>-----------------------------<br>export CC=mpicc<br>
export CXX=mpic++<br>
rm CMakeCache.txt<br>
cmake . <br>make VERBOSE=1<br>-----------------------------<br><br><div class="gmail_quote">2009/11/22 &quot;Sören Freudiger&quot; <span dir="ltr">&lt;<a href="mailto:muffmolch@gmx.de" target="_blank">muffmolch@gmx.de</a>&gt;</span><br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Taesoo<br>
We are also dealing with the mpicxx compiler.<br>
Best way (and the cmake way of doing that) is to change the env viariables CC and CXX.<br>
<br>
Because we are often switching between gxx and mpicxx, we are using bash scripts for that purpose:<br>
<br>
-------------<br>
#!bash<br>
export CC=/usr/bin/gcc-4.0<br>
export CXX=/usr/bin/g++-4.0<br>
<br>
echo CC=$CC<br>
echo CXX=$CXX<br>
<br>
#echo rm CMakeCache.txt<br>
rm CMakeCache.txt<br>
ccmake ~/lbm/source/patch2d/testcases/serial/.<br>
-------------<br>
<br>
Best SirAnn<br>
<br>
<br>
Von: <a href="mailto:cmake-bounces@cmake.org" target="_blank">cmake-bounces@cmake.org</a> [mailto:<a href="mailto:cmake-bounces@cmake.org" target="_blank">cmake-bounces@cmake.org</a>] Im Auftrag von Taesoo Kwon<br>
Gesendet: Sonntag, 22. November 2009 09:36<br>
An: <a href="mailto:cmake@cmake.org" target="_blank">cmake@cmake.org</a><br>
Betreff: [CMake] How can I change the compiler?<br>
<br>
<br>
I am sorry that this should be an recurring question.<br>
But I wasn&#39;t able to find any working solution after hours of search.<br>
<br>
What I tried is as follows:<br>
<br>
/root/CMakeLists.txt<br>
<br>
set(CMAKE_CXX_COMPILER mpic++)<br>
set(CMAKE_C_COMPILER mpicc)<br>
<br>
<br>
project (taesoo_cmu)<br>
<br>
add_subdirectory(BaseLib)<br>
add_subdirectory(MainLib)<br>
add_subdirectory(MainLib/luabind-0.7)<br>
add_subdirectory(OgreFltk)<br>
<br>
<br>
-----------------------<br>
<br>
in the OgreFltk directory, project (OgreFltk) and add_executable (OgreFltk ...) is defined.<br>
<br>
cmake .<br>
make VERBOSE=true<br>
<br>
revealed that I am still using c++ instead of mpic++.<br>
What should I change?<br>
Thanks.<br>
<br>
--<br>
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -<br>
sicherer, schneller und einfacher! <a href="http://portal.gmx.net/de/go/atbrowser" target="_blank">http://portal.gmx.net/de/go/atbrowser</a><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/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/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/listinfo/cmake</a><br>
</blockquote></div><br>