[CMake] What is the proper way to force compiler?

Alexander Neundorf a.neundorf-work at gmx.net
Tue Mar 2 14:36:03 EST 2010


On Tuesday 02 March 2010, J Decker wrote:
> I'd like to know why I have to do this at the end of each CMakeLists.txt...
>
> if( C++ )
>   set( CMAKE_C_COMPILER "${CMAKE_CXX_COMPILER}" )
>   set( CMAKE_C_COMPILE_OBJECT "${CMAKE_CXX_COMPILE_OBJECT}" )
> endif()

in general, you shouldn't have to do this at all.
This is only for very exotic circumstances.
Why do you actually do that at all ?

Alex


More information about the CMake mailing list