Commit b7506390 authored by Lynn Garren's avatar Lynn Garren
Browse files

more for Intel

parent a93cf425
......@@ -68,7 +68,10 @@ macro( clhep_package_compiler )
else()
SET (CPack_COMPILER_STRING "-gcc${CPack_COMPILER_STRING_VERSION}")
endif()
endif (CMAKE_COMPILER_IS_GNUCXX)
elseif( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel" )
STRING( REGEX REPLACE "^([0-9]+)\\.+.*" "\\1" CPack_COMPILER_STRING_VERSION "${CMAKE_CXX_COMPILER_VERSION}" )
SET (CPack_COMPILER_STRING "-icc${CPack_COMPILER_STRING_VERSION}")
endif ()
endif()
#message(STATUS "Package compiler ${CPack_COMPILER_STRING}")
endif(My_COMPILER)
......
......@@ -113,7 +113,7 @@ macro( _clhep_verify_cxx11 )
set( HAVE_STDCXX true )
endif()
elseif( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel" )
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.0)
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.0)
message( FATAL_ERROR "c++11 extension is not available for ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
else()
set( HAVE_STDCXX true )
......@@ -139,7 +139,6 @@ macro( _clhep_verify_cxx1y )
set( HAVE_STDCXX true )
endif()
elseif( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel" )
message( STATUS "COMPILER_VERSION_MAJOR is ${COMPILER_VERSION_MAJOR}")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0)
message( FATAL_ERROR "c++11 extension is not available for ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
else()
......@@ -164,7 +163,6 @@ macro( _clhep_verify_cxx14 )
set( HAVE_STDCXX true )
endif()
elseif( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel" )
message( STATUS "COMPILER_VERSION_MAJOR is ${COMPILER_VERSION_MAJOR}")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16.0)
message( FATAL_ERROR "c++11 extension is not available for ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
else()
......@@ -272,6 +270,7 @@ macro( clhep_set_compiler_flags )
set(CMAKE_C_FLAGS "-O -pedantic -Wall ${CMAKE_C_FLAGS}")
elseif( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel" )
set(CMAKE_C_FLAGS "-O -ansi -pedantic -Wall {CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "-O -ansi -pedantic -Wall ${CMAKE_CXX_FLAGS}")
elseif( CMAKE_COMPILER_IS_GNUCC )
set(CMAKE_C_FLAGS "-O -ansi -pedantic -Wall -D_GNU_SOURCE ${CMAKE_C_FLAGS}")
endif()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment