Try moving the quotes like this:<br>cmake ...... &quot;-DCMAKE_CXX_COMPILER:string=g++&quot; .......<br><br><div><span class="gmail_quote">On 8/8/07, <b class="gmail_sendername">Marie-Christine Vallet</b> &lt;<a href="mailto:mmvallet@ucdavis.edu">
mmvallet@ucdavis.edu</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>I would like to use g++ as my c compiler (which works) but cmake does
<br>not let me do that. Is this normal?<br>Thanks again,<br>Marie<br><br><br><br> cmake -DCMAKE_Fortran_COMPILER:string=g77<br>-DCMAKE_CXX_COMPILER:string=&quot;g++&quot; -DCMAKE_C_COMPILER:string=&quot;g++&quot;<br><br><br>
<br>-- Check for working CXX compiler: g++<br>-- Check for working CXX compiler: g++ -- works<br>-- Check for working C compiler: g++<br>-- Check for working C compiler: g++ -- broken<br>CMake Error: The C compiler &quot;g++&quot; is not able to compile a simple test
<br>program.<br>It fails with the following output:<br> /usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make<br>CMakeFiles/cmTryCompileExec.dir/build<br>gmake[1]: Entering directory<br>`/home/renault/kdeworkspace/skinmesh/CMakeFiles/CMakeTmp&#39;
<br>/usr/bin/cmake -E cmake_progress_report<br>/home/renault/kdeworkspace/skinmesh/CMakeFiles/CMakeTmp/CMakeFiles 1<br>Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.o<br>/usr/bin/g++&nbsp;&nbsp; -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.o&nbsp;&nbsp; -c
<br>/home/renault/kdeworkspace/skinmesh/CMakeFiles/CMakeTmp/testCCompiler.c<br>/home/renault/kdeworkspace/skinmesh/CMakeFiles/CMakeTmp/testCCompiler.c:2:3:<br>error: #error &quot;The CMAKE_C_COMPILER is set to a C++ compiler&quot;
<br>gmake[1]: *** [CMakeFiles/cmTryCompileExec.dir/testCCompiler.o] Error 1<br>gmake[1]: Leaving directory<br>`/home/renault/kdeworkspace/skinmesh/CMakeFiles/CMakeTmp&#39;<br>gmake: *** [cmTryCompileExec/fast] Error 2<br>
<br><br>CMake will not be able to correctly generate this project.<br>-- Configuring done<br><br>_______________________________________________<br>CMake mailing list<br><a href="mailto:CMake@cmake.org">CMake@cmake.org</a>
<br><a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br>