[CMake] How can I change the compiler?

Taesoo Kwon taesoobear at gmail.com
Sun Nov 22 03:36:01 EST 2009


I am sorry that this should be an recurring question.
But I wasn't able to find any working solution after hours of search.

What I tried is as follows:

/root/CMakeLists.txt

set(CMAKE_CXX_COMPILER mpic++)
set(CMAKE_C_COMPILER mpicc)


project (taesoo_cmu)

add_subdirectory(BaseLib)
add_subdirectory(MainLib)
add_subdirectory(MainLib/luabind-0.7)
add_subdirectory(OgreFltk)


-----------------------

in the OgreFltk directory, project (OgreFltk) and add_executable (OgreFltk
...) is defined.

cmake .
make VERBOSE=true

revealed that I am still using c++ instead of mpic++.
What should I change?
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091122/7f31d4d7/attachment-0001.htm>


More information about the CMake mailing list