From d1f3f6f38e7992c32f930f2dda46e4e0365acfd9 Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Fri, 23 May 2003 07:03:21 +0000 Subject: [PATCH] Add a new config macro BOOST_INTEL [SVN r18504] --- config.htm | 6 ++++++ include/boost/config/compiler/intel.hpp | 13 +++++++++---- include/boost/config/select_compiler_config.hpp | 2 +- test/config_info.cpp | 2 ++ 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/config.htm b/config.htm index 0ce11979..85fc9c77 100644 --- a/config.htm +++ b/config.htm @@ -1169,6 +1169,12 @@ user code.

Microsoft Visual C++, as opposed to one of the many other compilers that also define _MSC_VER. + + BOOST_INTEL + <boost/config.hpp> + Defined if the compiler is an Intel compiler, + takes the same value as the compiler version macro. + BOOST_DINKUMWARE_STDLIB <boost/config.hpp> diff --git a/include/boost/config/compiler/intel.hpp b/include/boost/config/compiler/intel.hpp index b54f6d8e..487e945f 100644 --- a/include/boost/config/compiler/intel.hpp +++ b/include/boost/config/compiler/intel.hpp @@ -9,14 +9,19 @@ #include "boost/config/compiler/common_edg.hpp" -#ifdef __ICL -# define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(__ICL) +#if defined(__INTEL_COMPILER) +# define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER +#elif defined(__ICL) # define BOOST_INTEL_CXX_VERSION __ICL -#else -# define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(__ICC) +#elif defined(__ICC) # define BOOST_INTEL_CXX_VERSION __ICC +#elif defined(__ECC) +# define BOOST_INTEL_CXX_VERSION __ECC #endif +#define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) +#define BOOST_INTEL BOOST_INTEL_CXX_VERSION + #if (BOOST_INTEL_CXX_VERSION <= 500) && defined(_MSC_VER) # define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS # define BOOST_NO_TEMPLATE_TEMPLATES diff --git a/include/boost/config/select_compiler_config.hpp b/include/boost/config/select_compiler_config.hpp index 14780ba6..66cbad9d 100644 --- a/include/boost/config/select_compiler_config.hpp +++ b/include/boost/config/select_compiler_config.hpp @@ -38,7 +38,7 @@ // Borland # define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp" -#elif defined(__ICL) || defined(__ICC) +#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) // Intel # define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp" diff --git a/test/config_info.cpp b/test/config_info.cpp index 02c82dc0..d639bc3b 100644 --- a/test/config_info.cpp +++ b/test/config_info.cpp @@ -260,6 +260,7 @@ void print_compiler_macros() // misc compilers not covered so far: PRINT_MACRO(__ICC); PRINT_MACRO(__ICL); + PRINT_MACRO(__ECC); PRINT_MACRO(__INTEL_COMPILER); PRINT_MACRO(__USLC__); PRINT_MACRO(__DECCXX); @@ -870,6 +871,7 @@ void print_boost_macros() PRINT_MACRO(BOOST_HAS_TWO_ARG_USE_FACET); PRINT_MACRO(BOOST_HAS_UNISTD_H); PRINT_MACRO(BOOST_HAS_WINTHREADS); + PRINT_MACRO(BOOST_INTEL); PRINT_MACRO(BOOST_MSVC); PRINT_MACRO(BOOST_MSVC_STD_ITERATOR); PRINT_MACRO(BOOST_MSVC6_MEMBER_TEMPLATES);