[Cmake-commits] [cmake-commits] king committed Linux-Intel-C.cmake 1.5 1.6 Linux-Intel-CXX.cmake 1.7 1.8 Linux-Intel-Fortran.cmake 1.6 1.7 Linux-Intel.cmake 1.2 1.3

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Dec 4 09:20:26 EST 2009


Update of /cvsroot/CMake/CMake/Modules/Platform
In directory public:/mounts/ram/cvs-serv15310/Modules/Platform

Modified Files:
	Linux-Intel-C.cmake Linux-Intel-CXX.cmake 
	Linux-Intel-Fortran.cmake Linux-Intel.cmake 
Log Message:
Consolidate Linux Intel compiler information

We consolidate duplicate code from Platform/Linux-Intel-<lang>.cmake
files into a macro defined in Platform/Linux-Intel.cmake.


Index: Linux-Intel-C.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Platform/Linux-Intel-C.cmake,v
retrieving revision 1.5
retrieving revision 1.6
diff -C 2 -d -r1.5 -r1.6
*** Linux-Intel-C.cmake	2 Oct 2009 17:52:12 -0000	1.5
--- Linux-Intel-C.cmake	4 Dec 2009 14:20:24 -0000	1.6
***************
*** 1,8 ****
  INCLUDE(Platform/Linux-Intel)
! IF(XIAR)
!   # INTERPROCEDURAL_OPTIMIZATION
!   SET(CMAKE_C_COMPILE_OPTIONS_IPO -ipo)
!   SET(CMAKE_C_CREATE_STATIC_LIBRARY_IPO
!     "${XIAR} cr <TARGET> <LINK_FLAGS> <OBJECTS> "
!     "${XIAR} -s <TARGET> ")
! ENDIF(XIAR)
--- 1,2 ----
  INCLUDE(Platform/Linux-Intel)
! __linux_compiler_intel(C)

Index: Linux-Intel.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Platform/Linux-Intel.cmake,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** Linux-Intel.cmake	2 Oct 2009 17:24:32 -0000	1.2
--- Linux-Intel.cmake	4 Dec 2009 14:20:24 -0000	1.3
***************
*** 1,2 ****
--- 1,22 ----
+ 
+ #=============================================================================
+ # Copyright 2002-2009 Kitware, Inc.
+ #
+ # Distributed under the OSI-approved BSD License (the "License");
+ # see accompanying file Copyright.txt for details.
+ #
+ # This software is distributed WITHOUT ANY WARRANTY; without even the
+ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ # See the License for more information.
+ #=============================================================================
+ # (To distributed this file outside of CMake, substitute the full
+ #  License text for the above reference.)
+ 
+ # This module is shared by multiple languages; use include blocker.
+ if(__LINUX_COMPILER_INTEL)
+   return()
+ endif()
+ set(__LINUX_COMPILER_INTEL 1)
+ 
  if(NOT XIAR)
    set(_intel_xiar_hints)
***************
*** 10,11 ****
--- 30,44 ----
    mark_as_advanced(XIAR)
  endif(NOT XIAR)
+ 
+ macro(__linux_compiler_intel lang)
+   set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC")
+   set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
+ 
+   if(XIAR)
+     # INTERPROCEDURAL_OPTIMIZATION
+     set(CMAKE_${lang}_COMPILE_OPTIONS_IPO -ipo)
+     set(CMAKE_${lang}_CREATE_STATIC_LIBRARY_IPO
+       "${XIAR} cr <TARGET> <LINK_FLAGS> <OBJECTS> "
+       "${XIAR} -s <TARGET> ")
+   endif()
+ endmacro()

Index: Linux-Intel-Fortran.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Platform/Linux-Intel-Fortran.cmake,v
retrieving revision 1.6
retrieving revision 1.7
diff -C 2 -d -r1.6 -r1.7
*** Linux-Intel-Fortran.cmake	2 Dec 2009 20:17:52 -0000	1.6
--- Linux-Intel-Fortran.cmake	4 Dec 2009 14:20:24 -0000	1.7
***************
*** 1,15 ****
  INCLUDE(Platform/Linux-Intel)
! IF(XIAR)
!   # INTERPROCEDURAL_OPTIMIZATION
!   SET(CMAKE_Fortran_COMPILE_OPTIONS_IPO -ipo)
!   SET(CMAKE_Fortran_CREATE_STATIC_LIBRARY_IPO
!     "${XIAR} cr <TARGET> <LINK_FLAGS> <OBJECTS> "
!     "${XIAR} -s <TARGET> ")
! ENDIF(XIAR)
! 
! SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-fPIC")
! SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-shared -i_dynamic -nofor_main")
! SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-i_dynamic")
! SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG "-Wl,-rpath,")
! SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":")
! SET(CMAKE_DL_LIBS "dl")
--- 1,4 ----
  INCLUDE(Platform/Linux-Intel)
! __linux_compiler_intel(Fortran)
! set(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS} -i_dynamic -nofor_main")
! set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-i_dynamic")

Index: Linux-Intel-CXX.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Platform/Linux-Intel-CXX.cmake,v
retrieving revision 1.7
retrieving revision 1.8
diff -C 2 -d -r1.7 -r1.8
*** Linux-Intel-CXX.cmake	2 Oct 2009 17:52:12 -0000	1.7
--- Linux-Intel-CXX.cmake	4 Dec 2009 14:20:24 -0000	1.8
***************
*** 1,8 ****
  INCLUDE(Platform/Linux-Intel)
! IF(XIAR)
!   # INTERPROCEDURAL_OPTIMIZATION
!   SET(CMAKE_CXX_COMPILE_OPTIONS_IPO -ipo)
!   SET(CMAKE_CXX_CREATE_STATIC_LIBRARY_IPO
!     "${XIAR} cr <TARGET> <LINK_FLAGS> <OBJECTS> "
!     "${XIAR} -s <TARGET> ")
! ENDIF(XIAR)
--- 1,2 ----
  INCLUDE(Platform/Linux-Intel)
! __linux_compiler_intel(CXX)



More information about the Cmake-commits mailing list