[Openmp-dev] Initial Intel Cmake Build System Patch

"C. Bergström" cbergstrom at pathscale.com
Tue Jun 10 09:07:57 PDT 2014


On 06/10/14 10:04 PM, Cownie, James H wrote:
>
>
> I think the issue here is related at least in part to what the aim is.
> Do we want a cmake system that is very easy for someone who has just downloaded the code to use to build for an existing configuration, or one that is easy for someone to modify to port to a new machine?
Considering this is a pretty small community already I'll try not to 
limit who should or will be using it
----------
My review proposed to move all this logic out of the code and into 
compiler specific cmake files. I'm sorry, but I don't see the proposed 
patch as being a good long term design.

A lite code example of what I meant

include (${CMAKE_ROOT}/runtime/toolcains.cmake)

Which could include this

|if  ("${CMAKE_CXX_COMPILER_ID}"  STREQUAL"Clang")
   # using Clang
|||   include (${CMAKE_ROOT}/runtime/clang.cmake)|
elseif("${CMAKE_CXX_COMPILER_ID}"  STREQUAL"GNU")
   # using GCC
elseif("${CMAKE_CXX_COMPILER_ID}"  STREQUAL"Intel")
   # using Intel C++ and set whatever is right for that compiler
||   include (${CMAKE_ROOT}/runtime/icc.cmake)
elseif("${CMAKE_CXX_COMPILER_ID}"  STREQUAL"MSVC")
   # using Visual Studio C++
||elseif("${CMAKE_CXX_COMPILER_ID}"  STREQUAL"PathScale")
   # using||PathScale|
|else
   # Defaults are used which may or may not be correct
endif()|

-----------------
icc.cmake
Set whatever you want




More information about the Openmp-dev mailing list