diff --git a/MagneticField/MagFieldElements/CMakeLists.txt b/MagneticField/MagFieldElements/CMakeLists.txt index 9095bd3a90a39879278cf19111c78ecfa4eb77a3..93d930c8287e6c82614afeefcee668c3baac996c 100644 --- a/MagneticField/MagFieldElements/CMakeLists.txt +++ b/MagneticField/MagFieldElements/CMakeLists.txt @@ -28,6 +28,5 @@ if ( "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" ) set_source_files_properties( ${CMAKE_CURRENT_SOURCE_DIR}/src/AtlasFieldCache.cxx PROPERTIES - COMPILE_FLAGS "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" - COMPILE_DEFINITIONS "FLATTEN" ) + COMPILE_FLAGS "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") endif() diff --git a/MagneticField/MagFieldElements/src/AtlasFieldCache.cxx b/MagneticField/MagFieldElements/src/AtlasFieldCache.cxx index 0e8179dfcc06168de354a650181c4b9819aa9a64..8e722a5f058cd8041a9ac7e634479450c8cb691b 100644 --- a/MagneticField/MagFieldElements/src/AtlasFieldCache.cxx +++ b/MagneticField/MagFieldElements/src/AtlasFieldCache.cxx @@ -26,13 +26,13 @@ namespace { constexpr double defaultB = 0.1 * Gaudi::Units::gauss; } -#if defined(FLATTEN) && defined(__GNUC__) +#if defined(__GNUC__) // We compile this package with optimization, even in debug builds; otherwise, // the heavy use of Eigen makes it too slow. However, from here we may call // to out-of-line Eigen code that is linked from other DSOs; in that case, // it would not be optimized. Avoid this by forcing all Eigen code // to be inlined here if possible. -__attribute__((flatten)) +[[gnu::flatten]] #endif void MagField::AtlasFieldCache::getField(const double* ATH_RESTRICT xyz,