[vtkusers] help to change compiler

Mathieu Malaterre mathieu.malaterre at kitware.com
Thu Mar 9 12:58:47 EST 2006


Hi Subir,

	Please keep posting to the ML, my Spam filter is very aggressive on 
personal emails ;-)

	Anyway I still don't understand where exactly is your problem ? Since 
you are posting to the VTK ML, I assumed you were trying to compile VTK, 
right ? If not then this is not the proper ML. Are you looking for 
information about CMake ? If so the CMake book can be found at:

    http://www.kitware.com/products/cmakebook.html

	Otherwise there are lots of freely available information on the net. 
And to get specific help on CMake, I'd suggest you to subscribe to the 
CMake ML, you can find it at:

   http://www.cmake.org/HTML/MailingLists.html

As for you specific question to set a specific compiler I repeat that 
the steps are simply:

cd MyProject/
mkdir MyProject-mpicc
cd MyProject-mpicc
export CC=mpicc
export CXX=mpic++
cmake /full/path/to/My/Project


   Calling "cmake ." will do an 'in source' built and you really don't 
want to do that in a multiple compilers environment.

HTH,
Mathieu



Subir Singh Lamba wrote:
> hi,
> 
> Sorry for bothering you. I know least about cmake etc. Until this time I 
> was using make. Now due to complications our group has started using 
> cmake.  I am not using VTK rather cannot use as I do not have admin. 
> permisson.  So I just use
> 
> $ cmake .
> 
> for compilation. Now my problem is where to change the compiler 
> settings. I have tried
> $set  CMAKE_C_COMPILER /opt/mpichdefault-1.2.6/bin/mpicc
> 
> but when i use
> 
> $cmake .
> 
> I get the following message
> ---------------------------------------------------------------------
> -- Check for working C compiler: gcc -- works
> -- Check for working CXX compiler: c++ -- works
> -- Configuring done
> -- Generating done
> -----------------------------------------------------------------------
> 
> Any help will be greatly appreciated.
> 
> regards,
> 
> Subir
> 
> 
> On 3/9/06, *Mathieu Malaterre* <mathieu.malaterre at kitware.com 
> <mailto:mathieu.malaterre at kitware.com>> wrote:
> 
>     Subir Singh Lamba wrote:
>      > Hi,
>      > I have to use Cmake to compile my program. The problem I am
>     facing is to
>      > how to change my compiler from gcc to mpicc. As I need to compile my
>      > parallel code with it
> 
>     Create a new directory, and inside that new empty dir, do:
> 
>     export CC=mpicc
>     export CXX=mpic++
>     cmake /full/path/to/VTK
> 
>     HTH
>     Mathieu
> 
> 




More information about the vtkusers mailing list