]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - Vc/cmake/VcMacros.cmake
bugfix: Lambda and ALambda Hijing and Inject histos added twice to output list of...
[u/mrichter/AliRoot.git] / Vc / cmake / VcMacros.cmake
index 1ae761e48c6ddfd0631faec7c7f48d68513f3d96..72616b178ba7939f3ff954c77e644d84c6db110e 100644 (file)
@@ -208,7 +208,6 @@ macro(vc_set_preferred_compiler_flags)
          AddCompilerFlag("-Wpointer-arith")
          AddCompilerFlag("-Wcast-align")
          AddCompilerFlag("-Wreturn-type")
-         AddCompilerFlag("-Wno-unused-function")
          AddCompilerFlag("-ansi")
          AddCompilerFlag("-pedantic")
          AddCompilerFlag("-Wno-long-long")
@@ -229,8 +228,8 @@ macro(vc_set_preferred_compiler_flags)
       #                                              GCC                                               #
       ##################################################################################################
       if(_add_warning_flags)
-         set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W -Wall -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wmultichar -Wtrigraphs -Wpointer-arith -Wcast-align -Wreturn-type -Wno-unused-function -pedantic -Wno-long-long -Wshadow")
-         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wall -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wmultichar -Wtrigraphs -Wpointer-arith -Wcast-align -Wreturn-type -Wno-unused-function -pedantic -Wno-long-long -Wshadow")
+         set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W -Wall -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wmultichar -Wtrigraphs -Wpointer-arith -Wcast-align -Wreturn-type -pedantic -Wno-long-long -Wshadow")
+         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wall -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wmultichar -Wtrigraphs -Wpointer-arith -Wcast-align -Wreturn-type -pedantic -Wno-long-long -Wshadow")
          if(NOT WIN32)
             # the -ansi flag makes MinGW unusable, so maybe it's better to omit it
             set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ansi")
@@ -243,11 +242,6 @@ macro(vc_set_preferred_compiler_flags)
             # GCC gives bogus "array subscript is above array bounds" warnings in math.cpp
             AddCompilerFlag("-Wno-array-bounds")
          endif()
-         if(Vc_GCC_VERSION VERSION_GREATER "4.7.99")
-            # GCC 4.8 warns about stuff we don't care about
-            # Some older GCC versions have problems to note that they don't support the flag
-            AddCompilerFlag("-Wno-unused-local-typedefs")
-         endif()
       endif()
       vc_add_compiler_flag(Vc_DEFINITIONS "-Wabi")
       vc_add_compiler_flag(Vc_DEFINITIONS "-fabi-version=0") # ABI version 4 is required to make __m128 and __m256 appear as different types. 0 should give us the latest version.
@@ -367,7 +361,7 @@ macro(vc_set_preferred_compiler_flags)
       # for now I don't know of any arguments I want to pass. -march and stuff is tried by OptimizeForArchitecture...
       if(Vc_CLANG_VERSION VERSION_EQUAL "3.0")
          UserWarning("Clang 3.0 has serious issues to compile Vc code and will most likely crash when trying to do so.\nPlease update to a recent clang version.")
-      elseif(Vc_CLANG_VERSION VERSION_LESS "3.3")
+      elseif(Vc_CLANG_VERSION VERSION_EQUAL "3.2" AND NOT APPLE)
          # the LLVM assembler gets FMAs wrong (bug 15040)
          vc_add_compiler_flag(Vc_DEFINITIONS "-no-integrated-as")
       endif()
@@ -376,13 +370,13 @@ macro(vc_set_preferred_compiler_flags)
       vc_add_compiler_flag(Vc_DEFINITIONS "-Wno-local-type-template-args")
       vc_add_compiler_flag(Vc_DEFINITIONS "-Wno-unnamed-type-template-args")
 
-      AddCompilerFlag(-stdlib=libc++)
+      if(NOT DEFINED Vc_INSIDE_ROOT)  # ROOT has to set this up
+         AddCompilerFlag(-stdlib=libc++)
+      endif()
    endif()
 
-   if(NOT Vc_COMPILER_IS_MSVC)
-     if(NOT Vc_COMPILER_IS_INTEL)
-       vc_add_compiler_flag(Vc_DEFINITIONS "-ffp-contract=fast")
-     endif()
+   if(NOT Vc_COMPILER_IS_MSVC AND NOT Vc_COMPILER_IS_INTEL)
+      vc_add_compiler_flag(Vc_DEFINITIONS "-ffp-contract=fast")
    endif()
 
    OptimizeForArchitecture()
@@ -538,10 +532,8 @@ macro(vc_compile_for_all_implementations _objs _src)
       _vc_compile_one_implementation(${_objs} AVX      "-mavx"    "-xAVX"    "/arch:AVX")
       if(NOT Vc_XOP_INTRINSICS_BROKEN)
          if(NOT Vc_FMA4_INTRINSICS_BROKEN)
-          if (NOT Vc_COMPILER_IS_INTEL)
-             _vc_compile_one_implementation(${_objs} SSE+XOP+FMA4 "-mxop -mfma4"        ""    "")
-             _vc_compile_one_implementation(${_objs} AVX+XOP+FMA4 "-mavx -mxop -mfma4"  ""    "")
-         endif()
+            _vc_compile_one_implementation(${_objs} SSE+XOP+FMA4 "-mxop -mfma4"        ""    "")
+            _vc_compile_one_implementation(${_objs} AVX+XOP+FMA4 "-mavx -mxop -mfma4"  ""    "")
          endif()
          _vc_compile_one_implementation(${_objs} SSE+XOP+FMA "-mxop -mfma"        ""    "")
          _vc_compile_one_implementation(${_objs} AVX+XOP+FMA "-mavx -mxop -mfma"  ""    "")