Re: [CMake] Changing the compiler in CMakeLists
Alexander Neundorf
a.neundorf-work at gmx.net
Fri Jul 15 02:11:32 EDT 2005
> Von: "Andriy Fedorov" <fedorov at bwh.harvard.edu>
...
> Hi,
>
> I have a project which is using ITK and VTK compiled with gcc, but I
> want to buld the executable with mpiCC. mpiCC is basically a wrapper
> around gcc, which adds some paths and libraries. What I do now is I
> change the compiler manually in CMakeCCompiler.cmake and
> CMakeCXXCompiler.cmake, but I am sure this is not the right way to do
> it. I tried to set CMAKE_C_COMPILER in CMakeLists.txt, but CMake
> enforces gcc from ITK. Does anyone know how to do this right?
> Thank you
I'm using the following and it works without problems:
SET(CMAKE_CXX_COMPILER "arm-elf-c++")
SET(CMAKE_COMPILER_IS_GNUCXX 1)
SET(CMAKE_C_COMPILER "arm-elf-gcc")
SET(CMAKE_AR "arm-elf-ar")
SET(CMAKE_RANLIB "arm-elf-ranlib")
Maybe you just missed CMAKE_CXX_COMPILER ?
Bye
Alex
--
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse f�r Mail, Message, More +++
More information about the CMake
mailing list