[CMake] [Patch] Re: cmake Debug builds with icc

Lucas Wilcox lucasw at ices.utexas.edu
Thu Apr 24 18:50:55 EDT 2008


* Lucas Wilcox <lucasw at ices.utexas.edu> [2008-04-23 11:49:03 -0500]:

> Hi,
> 
> I am trying to setup Debug and Release builds using icc
> (intel's c compiler) on Linux.  It seems as though
>    CMAKE_C_FLAGS_DEBUG
>    CMAKE_C_FLAGS_MINSIZEREL
>    CMAKE_C_FLAGS_RELEASE
>    CMAKE_C_FLAGS_RELWITHDEBINFO
> are not being set.  Although
>    CMAKE_CXX_FLAGS_DEBUG
>    CMAKE_CXX_FLAGS_MINSIZEREL
>    CMAKE_CXX_FLAGS_RELEASE_INIT
>    CMAKE_CXX_FLAGS_RELWITHDEBINFO
> are being set correctly.  I tried both
>   cmake version 2.6-patch 0 RC-8
>   cmake version 2.4-patch 6
> with the same results.

I figured out what the problem is.  There doesn't exist
a Linux-icc.cmake file.  Can someone please add the
attached Linux-icc.cmake file to the CVS repository in
the Modules/Platform directory?

Thanks,
Lucas
-------------- next part --------------
SET (CMAKE_C_FLAGS_INIT "")
SET (CMAKE_C_FLAGS_DEBUG_INIT "-g")
SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
SET (CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG")
SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")

FIND_PROGRAM(XIAR xiar)
IF(XIAR)
  SET(CMAKE_C_CREATE_STATIC_LIBRARY
      "${XIAR} cr <TARGET> <LINK_FLAGS> <OBJECTS> "
      "${XIAR} -s <TARGET> ")
ENDIF(XIAR)
MARK_AS_ADVANCED(XIAR)


More information about the CMake mailing list