From 9290e640fd9b38c57cdd0f0c54c18831de58a435 Mon Sep 17 00:00:00 2001 From: Olivier Parcollet Date: Thu, 25 Jul 2013 23:08:44 +0200 Subject: [PATCH] icc : workaround macro was not set in the config.h - forgot to declare one cmake var. - test can now be not compiled (Build_Triqs_General_Tools_Test had no effect) --- CMakeLists.txt | 8 +++++--- cmake/FindCompilerCheck.cmake | 4 +++- triqs/utility/compiler_details.hpp | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 66ba1449..58850089 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -298,8 +298,6 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") endif( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # -## Remove the test from the build ? -option(Build_Triqs_General_Tools_Test "Build the test of the general tool ? ( array class , ... ) " ON) # 64 bits machine ? #if(CMAKE_SIZEOF_VOID_P EQUAL 8 OR CMAKE_GENERATOR MATCHES Win64) @@ -413,7 +411,11 @@ endif (PythonSupport) #------------------------ # tests #------------------------ -add_subdirectory(${TRIQS_SOURCE_DIR}/test ) +## Remove the test from the build ? +option(Build_Triqs_General_Tools_Test "Build the test of the general tool ? ( array class , ... ) " ON) +if (Build_Triqs_General_Tools_Test) + add_subdirectory(${TRIQS_SOURCE_DIR}/test ) +endif() #------------------------ # Documentation diff --git a/cmake/FindCompilerCheck.cmake b/cmake/FindCompilerCheck.cmake index 54ad2470..709cbf4b 100644 --- a/cmake/FindCompilerCheck.cmake +++ b/cmake/FindCompilerCheck.cmake @@ -88,7 +88,9 @@ ENDIF( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # for icc, add the very infamous flags or calculation of boost::math bessel function are wrong !! # tested on boost 1.53 IF(CMAKE_COMPILER_IS_ICC) - set(TRIQS_CXX_DEFINITIONS ${TRIQS_CXX_DEFINITIONS} -DTRIQS_WORKAROUND_INTEL_COMPILER_BUGS -DBOOST_MATH_DISABLE_STD_FPCLASSIFY) + set(TRIQS_WORKAROUND_INTEL_COMPILER_BUGS 1) + set(BOOST_MATH_DISABLE_STD_FPCLASSIFY 1) + #set(TRIQS_CXX_DEFINITIONS ${TRIQS_CXX_DEFINITIONS} -DTRIQS_WORKAROUND_INTEL_COMPILER_BUGS -DBOOST_MATH_DISABLE_STD_FPCLASSIFY) #add_definitions( -DTRIQS_WORKAROUND_INTEL_COMPILER_BUGS -DBOOST_MATH_DISABLE_STD_FPCLASSIFY) MESSAGE(STATUS " Adding compilation flags -DTRIQS_WORKAROUND_INTEL_COMPILER_BUGS -DBOOST_MATH_DISABLE_STD_FPCLASSIFY") ENDIF(CMAKE_COMPILER_IS_ICC) diff --git a/triqs/utility/compiler_details.hpp b/triqs/utility/compiler_details.hpp index 686bad0b..9273c956 100644 --- a/triqs/utility/compiler_details.hpp +++ b/triqs/utility/compiler_details.hpp @@ -30,7 +30,7 @@ + __GNUC_MINOR__ * 100 \ + __GNUC_PATCHLEVEL__) #if GCC_VERSION < 40801 -#warning "gcc compiler" GCC_VERSION +//#warning "gcc compiler" GCC_VERSION #define TRIQS_COMPILER_IS_OBSOLETE // we still accept gcc 4.6 and 4.7, but only the 4.8.1 and higher is a compliant c++11 #endif