[CMake] Avoid cmake forcing CMAKE_CXX_COMPILER

Filipe Sousa natros at gmail.com
Sat Apr 5 15:55:04 EDT 2008


Arunachalam Narayanaswamy wrote:
> Hi,
>    Is there a way to avoid cmake forcing CMAKE_CXX_COMPILER? Here is my
> problem.

set the CXX environment variable to your compiler

$ CXX=cpp_compiler cmake path_to_sources

> I have a compiler and I have an MPI Wrapper written around this
> compiler. I would want to compile ITK with the naked compiler because
> the wrapper has too many optimization flags which would be inappropriate
> for compiling the whole of ITK. But I would want to use the wrapper for
> compiling future projects which use ITK. Whenever I do this, CMake
> forces the compiler to be the compiler used for building ITK. The "dirty
> hack" that I use right now to get around this, is to keep a local copy
> of the wrapper/compiler and rename them as needed to satisfy CMake's
> needs. Is there a better way around this? I'm sure there must be, I just
> dont know what. Also, it seems too naive for CMake to force the exact
> compiler path. It should be using a combination of compiler
> identification string and build system type right?
> 
> best
> Arun
> 
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080405/ad04d215/attachment.pgp>


More information about the CMake mailing list