Commit 630bdff1 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Switched from the HAVE_ICPC macro to __INTEL_COMPILER

This does not need any code in cmake as the macro is defined by the
compiler itself. See also the table here:
http://nadeausoftware.com/articles/2012/10/c_c_tip_how_detect_compiler_name_and_version_using_compiler_predefined_macros
parent 87cbf168
Loading
Loading
Loading
Loading
+0 −6
Original line number Original line Diff line number Diff line
@@ -48,12 +48,6 @@ set( CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "" )
set( CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_DEBUG "-rdynamic" )
set( CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_DEBUG "-rdynamic" )
set( CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_RELEASE "" )
set( CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_RELEASE "" )


get_filename_component( CXX_COMPILER_NAME ${CMAKE_CXX_COMPILER} NAME )
if( CXX_COMPILER_NAME MATCHES "icpc" )
   message( "Intel compiler detected..."    )
   set( CMAKE_CXX_FLAGS "${CXXFLAGS} -DHAVE_ICPC ")
endif()

#####
#####
# Check for CUDA
# Check for CUDA
#
#
+5 −5
Original line number Original line Diff line number Diff line
@@ -123,7 +123,7 @@ class StaticFor
   __cuda_callable__
   __cuda_callable__
   static void exec()
   static void exec()
   {
   {
#ifndef HAVE_ICPC
#ifndef __INTEL_COMPILER
      StaticForExecutor< IndexType,
      StaticForExecutor< IndexType,
                         StaticForIndexTag< IndexType, begin >,
                         StaticForIndexTag< IndexType, begin >,
                         StaticForIndexTag< IndexType, end - begin >,
                         StaticForIndexTag< IndexType, end - begin >,
@@ -137,7 +137,7 @@ class StaticFor
   __cuda_callable__
   __cuda_callable__
   static void exec( T &p )
   static void exec( T &p )
   {
   {
#ifndef HAVE_ICPC
#ifndef __INTEL_COMPILER
      StaticForExecutor< IndexType,
      StaticForExecutor< IndexType,
                         StaticForIndexTag< IndexType, begin >,
                         StaticForIndexTag< IndexType, begin >,
                         StaticForIndexTag< IndexType, end - begin >,
                         StaticForIndexTag< IndexType, end - begin >,
@@ -152,7 +152,7 @@ class StaticFor
   __cuda_callable__
   __cuda_callable__
   static void exec( T0& p0, T1& p1 )
   static void exec( T0& p0, T1& p1 )
   {
   {
#ifndef HAVE_ICPC
#ifndef __INTEL_COMPILER
      StaticForExecutor< IndexType,
      StaticForExecutor< IndexType,
                         StaticForIndexTag< IndexType, begin >,
                         StaticForIndexTag< IndexType, begin >,
                         StaticForIndexTag< IndexType, end - begin >,
                         StaticForIndexTag< IndexType, end - begin >,
@@ -168,7 +168,7 @@ class StaticFor
   __cuda_callable__
   __cuda_callable__
   static void exec( T0& p0, T1& p1, T2& p2 )
   static void exec( T0& p0, T1& p1, T2& p2 )
   {
   {
#ifndef HAVE_ICPC
#ifndef __INTEL_COMPILER
      StaticForExecutor< IndexType,
      StaticForExecutor< IndexType,
                         StaticForIndexTag< IndexType, begin >,
                         StaticForIndexTag< IndexType, begin >,
                         StaticForIndexTag< IndexType, end - begin >,
                         StaticForIndexTag< IndexType, end - begin >,
@@ -185,7 +185,7 @@ class StaticFor
   __cuda_callable__
   __cuda_callable__
   static void exec( T0& p0, T1& p1, T2& p2, T3& p3 )
   static void exec( T0& p0, T1& p1, T2& p2, T3& p3 )
   {
   {
#ifndef HAVE_ICPC
#ifndef __INTEL_COMPILER
      StaticForExecutor< IndexType,
      StaticForExecutor< IndexType,
                         StaticForIndexTag< IndexType, begin >,
                         StaticForIndexTag< IndexType, begin >,
                         StaticForIndexTag< IndexType, end - begin >,
                         StaticForIndexTag< IndexType, end - begin >,
+2 −2
Original line number Original line Diff line number Diff line
@@ -8,7 +8,7 @@


/* See Copyright Notice in tnl/Copyright */
/* See Copyright Notice in tnl/Copyright */


#ifndef HAVE_ICPC
#ifndef __INTEL_COMPILER
#include "tnl-mesh-convert.h"
#include "tnl-mesh-convert.h"
#endif
#endif
#include <TNL/Config/ParameterContainer.h>
#include <TNL/Config/ParameterContainer.h>
@@ -35,7 +35,7 @@ int main( int argc, char* argv[] )
      conf_desc.printUsage( argv[ 0 ] );
      conf_desc.printUsage( argv[ 0 ] );
      return EXIT_FAILURE;
      return EXIT_FAILURE;
   }
   }
#ifndef HAVE_ICPC
#ifndef __INTEL_COMPILER
   if( ! convertMesh( parameters ) )
   if( ! convertMesh( parameters ) )
      return EXIT_FAILURE;
      return EXIT_FAILURE;
#endif
#endif