[CMake] CMAKE_COMPILER_IS_GNUCC_RUN and its equivalent
Kishore, Jonnalagadda (IE10)
Kishore.Jonnalagadda at honeywell.com
Tue Mar 20 12:39:26 EST 2007
As I may have mentioned before, I am cross compiling and so far i seem
to be doing OK.
To enable cross compiling I have the macro
MACRO(ENABLE_CROSSCOMPILE)
SET (CMAKE_SKIP_COMPATIBILITY_TESTS 1)
SET (CMAKE_C_COMPILER_WORKS 1)
SET (CMAKE_CXX_COMPILER_WORKS 1)
SET (CMAKE_COMPILER_IS_GNUCC_RUN 1)
SET (CMAKE_COMPILER_IS_GNUCXX_RUN 1)
ENDMACRO(ENABLE_CROSSCOMPILE)
Called before declaring the compiler to use which in turn is set before
the first project is declared. What I don't understand is the need for
the lines
SET (CMAKE_COMPILER_IS_GNUCC_RUN 1)
SET (CMAKE_COMPILER_IS_GNUCXX_RUN 1)
If I remove them then link fails with unrecognized option
'--major-image-version'. I am fine with using the above two lines
currently as my compiler is indeed a GCC variant. But if it were not,
then is there an equivalent for other compilers? What is the
role/purpose of those variables?
Warm regards,
Kishore
More information about the CMake
mailing list