diff --git a/GaudiExamples/tests/qmtest/gaudiexamples.qms/google_auditors.qms/heapchecker.qmt b/GaudiExamples/tests/qmtest/gaudiexamples.qms/google_auditors.qms/heapchecker.qmt index 186efa9bd736cc2575e8036cfa7ca9d643e0956d..c6d7dd09787f589d093214e7a0f7ac3c22733a21 100644 --- a/GaudiExamples/tests/qmtest/gaudiexamples.qms/google_auditors.qms/heapchecker.qmt +++ b/GaudiExamples/tests/qmtest/gaudiexamples.qms/google_auditors.qms/heapchecker.qmt @@ -45,6 +45,8 @@ ApplicationMgr(EvtMax=10, <text>lsan</text> <text>ubsan</text> <text>tsan</text> + <text>^arm</text> + <text>^aarch</text> </set></argument> <argument name="validator"><text> # hide a difference between JobOptionsSvc and Configurables diff --git a/GaudiKernel/CMakeLists.txt b/GaudiKernel/CMakeLists.txt index 34b93b1b1bf7d1b79603d07ecae2a2ca68a90b6a..2fba5078bd7e84fcf756e2564e40134b9da4b005 100644 --- a/GaudiKernel/CMakeLists.txt +++ b/GaudiKernel/CMakeLists.txt @@ -10,30 +10,33 @@ ##################################################################################### # GaudiKernel subdirectory -# Look for VectorClass required header (private dependency) -find_path(VectorClass_INCLUDE_DIR NAMES instrset_detect.cpp) -if(VectorClass_INCLUDE_DIR AND NOT VectorClass_VERSION) - # check that the version is good enough - set(VectorClass_VERSION 0.0) - file(STRINGS ${VectorClass_INCLUDE_DIR}/instrset.h _vectorclass_guard REGEX "define +INSTRSET_H +[0-9]+") - list(GET _vectorclass_guard 0 _vectorclass_guard) - if(_vectorclass_guard MATCHES "INSTRSET_H +([0-9][0-9][0-9][0-9][0-9])") - string(REGEX REPLACE "([0-9]+)([0-9][0-9])([0-9][0-9])" "\\1.\\2.\\3" VectorClass_VERSION "${CMAKE_MATCH_1}") - elseif(_vectorclass_guard MATCHES "INSTRSET_H +([0-9][0-9][0-9])") - string(REGEX REPLACE "([0-9]+)([0-9][0-9])" "\\1.\\2" VectorClass_VERSION "${CMAKE_MATCH_1}") +# VectorClass only supports x86_64 architectures +if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + # Look for VectorClass required header (private dependency) + find_path(VectorClass_INCLUDE_DIR NAMES instrset_detect.cpp) + if(VectorClass_INCLUDE_DIR AND NOT VectorClass_VERSION) + # check that the version is good enough + set(VectorClass_VERSION 0.0) + file(STRINGS ${VectorClass_INCLUDE_DIR}/instrset.h _vectorclass_guard REGEX "define +INSTRSET_H +[0-9]+") + list(GET _vectorclass_guard 0 _vectorclass_guard) + if(_vectorclass_guard MATCHES "INSTRSET_H +([0-9][0-9][0-9][0-9][0-9])") + string(REGEX REPLACE "([0-9]+)([0-9][0-9])([0-9][0-9])" "\\1.\\2.\\3" VectorClass_VERSION "${CMAKE_MATCH_1}") + elseif(_vectorclass_guard MATCHES "INSTRSET_H +([0-9][0-9][0-9])") + string(REGEX REPLACE "([0-9]+)([0-9][0-9])" "\\1.\\2" VectorClass_VERSION "${CMAKE_MATCH_1}") + endif() + set(VectorClass_VERSION "${VectorClass_VERSION}" CACHE INTERNAL "") endif() - set(VectorClass_VERSION "${VectorClass_VERSION}" CACHE INTERNAL "") -endif() -if(NOT VectorClass_INCLUDE_DIR OR VectorClass_VERSION VERSION_LESS 2.01.02) - if(VectorClass_INCLUDE_DIR) - message(STATUS "Found VectorClass instrset_detect ${VectorClass_VERSION} at ${VectorClass_INCLUDE_DIR}") + if(NOT VectorClass_INCLUDE_DIR OR VectorClass_VERSION VERSION_LESS 2.01.02) + if(VectorClass_INCLUDE_DIR) + message(STATUS "Found VectorClass instrset_detect ${VectorClass_VERSION} at ${VectorClass_INCLUDE_DIR}") + endif() + message(WARNING "using internal VectorClass instrset_detect (2.01.02)") + set(VectorClass_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/contrib" CACHE PATH "" FORCE) + set(VectorClass_VERSION "1.25" CACHE INTERNAL "" FORCE) endif() - message(WARNING "using internal VectorClass instrset_detect (2.01.02)") - set(VectorClass_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/contrib" CACHE PATH "" FORCE) - set(VectorClass_VERSION "1.25" CACHE INTERNAL "" FORCE) + mark_as_advanced(VectorClass_INCLUDE_DIR) + message(STATUS "Using VectorClass instrset_detect ${VectorClass_VERSION} at ${VectorClass_INCLUDE_DIR}") endif() -mark_as_advanced(VectorClass_INCLUDE_DIR) -message(STATUS "Using VectorClass instrset_detect ${VectorClass_VERSION} at ${VectorClass_INCLUDE_DIR}") # Build the library gaudi_add_library(GaudiKernel diff --git a/GaudiKernel/src/Lib/System.cpp b/GaudiKernel/src/Lib/System.cpp index da7dd7c673304b7cc1053c178aa0f587097705ad..c377078ee32bf20358ca0c36a336e60f8d728187 100644 --- a/GaudiKernel/src/Lib/System.cpp +++ b/GaudiKernel/src/Lib/System.cpp @@ -44,9 +44,11 @@ # include "Platform/SystemWin32.h" #endif -#define VCL_NAMESPACE Gaudi -#include "instrset_detect.cpp" -#undef VCL_NAMESPACE +#ifdef __x86_64 +# define VCL_NAMESPACE Gaudi +# include "instrset_detect.cpp" +# undef VCL_NAMESPACE +#endif #ifdef _WIN32 # define strcasecmp _stricmp @@ -334,8 +336,12 @@ const std::string& System::machineType() { } int System::instructionsetLevel() { +#ifdef __x86_64 using namespace Gaudi; return instrset_detect(); +#else + return -1; +#endif } /// User login name