Merge pull request #349 from jardous/fastmath

add -ffast-math to speed up the execution
This commit is contained in:
Robin Davies
2025-07-23 14:14:12 -04:00
committed by GitHub
+9 -22
View File
@@ -169,10 +169,10 @@ if (CMAKE_BUILD_TYPE MATCHES Debug)
endif() endif()
elseif(CMAKE_BUILD_TYPE MATCHES RelWithDebInfo) elseif(CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
message(STATUS "RelWithgDebInfo build") message(STATUS "RelWithgDebInfo build")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O3 -DNDEBUG" ) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O3 -ffast-math -DNDEBUG" )
else() else()
message(STATUS "Release build") message(STATUS "Release build")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -DNDEBUG" ) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -ffast-math -DNDEBUG" )
endif() endif()
if (ENABLE_BACKTRACE) if (ENABLE_BACKTRACE)
@@ -350,8 +350,7 @@ add_library(libpipedald STATIC ${PIPEDAL_SOURCES})
target_compile_definitions(libpipedald PUBLIC "_REENTRANT") target_compile_definitions(libpipedald PUBLIC "_REENTRANT")
target_include_directories(libpipedald PUBLIC ${PIPEDAL_INCLUDES} target_include_directories(libpipedald PUBLIC ${PIPEDAL_INCLUDES})
)
target_link_libraries(libpipedald target_link_libraries(libpipedald
PUBLIC PUBLIC
@@ -394,10 +393,7 @@ target_include_directories(pipedald PRIVATE ${PIPEDAL_INCLUDES})
target_compile_definitions(pipedald PRIVATE "ENABLE_BACKTRACE=${ENABLE_BACKTRACE}") target_compile_definitions(pipedald PRIVATE "ENABLE_BACKTRACE=${ENABLE_BACKTRACE}")
target_link_libraries(pipedald PRIVATE PiPedalCommon target_link_libraries(pipedald PRIVATE PiPedalCommon ${PIPEDAL_LIBS})
${PIPEDAL_LIBS}
)
################################# #################################
@@ -448,15 +444,11 @@ add_executable(pipedaltest
MemDebug.hpp MemDebug.hpp
) )
target_link_libraries(pipedaltest PRIVATE ${PIPEDAL_LIBS} ${ICU_LIBRARIES}) target_link_libraries(pipedaltest PRIVATE ${PIPEDAL_LIBS} ${ICU_LIBRARIES})
target_include_directories(pipedaltest PRIVATE ${PIPEDAL_INCLUDES} target_include_directories(pipedaltest PRIVATE ${PIPEDAL_INCLUDES})
)
set_target_properties(pipedaltest PROPERTIES EXCLUDE_FROM_ALL ${PIPEDAL_EXCLUDE_TESTS}) set_target_properties(pipedaltest PROPERTIES EXCLUDE_FROM_ALL ${PIPEDAL_EXCLUDE_TESTS})
if (NOT GITHUB_ACTIONS) # Google perftools are not available on Github action servers. if (NOT GITHUB_ACTIONS) # Google perftools are not available on Github action servers.
add_executable(pipedalProfilePlugin add_executable(pipedalProfilePlugin
profilePluginMain.cpp ArmPerformanceCounters.hpp profilePluginMain.cpp ArmPerformanceCounters.hpp
) )
@@ -467,10 +459,8 @@ if (NOT GITHUB_ACTIONS) # Google perftools are not available on Github action se
if (${DEBIAN_ARCHITECTURE} MATCHES arm64) if (${DEBIAN_ARCHITECTURE} MATCHES arm64)
target_compile_definitions(pipedalProfilePlugin PRIVATE "PIPEDAL_AARCH64") target_compile_definitions(pipedalProfilePlugin PRIVATE "PIPEDAL_AARCH64")
endif() endif()
endif() endif()
add_executable(jsonTest add_executable(jsonTest
testMain.cpp testMain.cpp
jsonTest.cpp jsonTest.cpp
@@ -484,8 +474,7 @@ add_executable(jsonTest
PromiseTest.cpp PromiseTest.cpp
) )
target_link_libraries(jsonTest PRIVATE PiPedalCommon) target_link_libraries(jsonTest PRIVATE PiPedalCommon)
target_include_directories(jsonTest PRIVATE ${PIPEDAL_INCLUDES} target_include_directories(jsonTest PRIVATE ${PIPEDAL_INCLUDES})
)
set_target_properties(jsonTest PROPERTIES EXCLUDE_FROM_ALL ${PIPEDAL_EXCLUDE_TESTS}) set_target_properties(jsonTest PROPERTIES EXCLUDE_FROM_ALL ${PIPEDAL_EXCLUDE_TESTS})
@@ -710,8 +699,7 @@ if(ENABLE_VST3)
# asan_options.cpp # asan_options.cpp
# ) # )
target_include_directories(vst3test PRIVATE ${PIPEDAL_INCLUDES} target_include_directories(vst3test PRIVATE ${PIPEDAL_INCLUDES})
)
target_link_libraries(vst3test PRIVATE ${PIPEDAL_LIBS} target_link_libraries(vst3test PRIVATE ${PIPEDAL_LIBS}
@@ -773,8 +761,7 @@ add_executable(pipedal_latency_test
CpuUse.cpp CpuUse.cpp
) )
target_link_libraries(pipedal_latency_test PRIVATE pthread asound PiPedalCommon target_link_libraries(pipedal_latency_test PRIVATE pthread asound PiPedalCommon)
)
add_executable(pipedal_alsa_info add_executable(pipedal_alsa_info