[CMake] Supporting the Intel Compiler -- buildingstatic libraries
Bill Hoffman
bill.hoffman at kitware.com
Fri Apr 18 15:17:50 EDT 2008
Blezek, Daniel J., Ph.D. wrote:
> Bill Hoffman wrote:
>> OK, so that is the file being used. Can you try adding the following
>> to the end of Linux-icpc.cmake and see if it works out of the box for
>> you:
>>
>> FIND_PROGRAM(XIAR xiar)
>> IF(XIAR)
>> SET( CMAKE_AR "${XIAR}")
>> ENDIF(XIAR)
>> MARK_AS_ADVANCED(XIAR)
>
>
> No, XIAR was properly set, but CMAKE_AR was /usr/bin/ar. This did work
> with a -DCMAKE_AR arg to the initial run of cmake though.
>
> Regards,
> -dan
>
Can you try this:
FIND_PROGRAM(XIAR xiar)
IF(XIAR)
SET(CMAKE_CXX_CREATE_STATIC_LIBRARY
"${XIAR} cr <TARGET> <LINK_FLAGS> <OBJECTS> "
"${XIAR} <TARGET> ")
SET(CMAKE_C_CREATE_STATIC_LIBRARY
"${XIAR} cr <TARGET> <LINK_FLAGS> <OBJECTS> "
"${XIAR} <TARGET> ")
SET( CMAKE_AR "${XIAR}")
ENDIF(XIAR)
MARK_AS_ADVANCED(XIAR)
-Bill
More information about the CMake
mailing list