From 17cef6abd7e26fc6b016731d87498fac264b4b53 Mon Sep 17 00:00:00 2001 From: David Rohr Date: Mon, 4 Mar 2024 23:10:57 +0100 Subject: [PATCH] GPU: Compile with -ffast-math --- GPU/GPUTracking/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/GPU/GPUTracking/CMakeLists.txt b/GPU/GPUTracking/CMakeLists.txt index 7d0c7e52ce646..ee0ce3d69fc3b 100644 --- a/GPU/GPUTracking/CMakeLists.txt +++ b/GPU/GPUTracking/CMakeLists.txt @@ -13,6 +13,10 @@ set(MODULE GPUTracking) # set(CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}} -O0") # to uncomment if needed, tired of typing this... +if(NOT ${GPUCA_NO_FAST_MATH} AND NOT CMAKE_BUILD_TYPE STREQUAL "DEBUG") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math") +endif() + include(cmake/helpers.cmake) if(ALIGPU_BUILD_TYPE STREQUAL "ALIROOT")