mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-17 08:01:12 +02:00
Enable Interprocedural Optimization
CMake will now enable linking IPO if the compiler supports it Signed-off-by: Emily Mabrey <emabrey@tenacityaudio.org>
This commit is contained in:
@@ -156,11 +156,6 @@ set( CMAKE_PREFIX_PATH
|
|||||||
${CMAKE_PREFIX_PATH}
|
${CMAKE_PREFIX_PATH}
|
||||||
)
|
)
|
||||||
|
|
||||||
# This "is a good thing" but greatly increases link time on Linux
|
|
||||||
#set( CMAKE_INTERPROCEDURAL_OPTIMIZATION ON )
|
|
||||||
#set( CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON )
|
|
||||||
#set( CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG OFF )
|
|
||||||
|
|
||||||
# Set the required C++ standard
|
# Set the required C++ standard
|
||||||
set( CMAKE_CXX_STANDARD 17 )
|
set( CMAKE_CXX_STANDARD 17 )
|
||||||
set( CMAKE_CXX_STANDARD_REQUIRED ON )
|
set( CMAKE_CXX_STANDARD_REQUIRED ON )
|
||||||
@@ -169,6 +164,20 @@ include( CMakeDependentOption )
|
|||||||
|
|
||||||
project( Tenacity )
|
project( Tenacity )
|
||||||
|
|
||||||
|
#This must appear after the project declaration so it can detect ENABLED_LANGUAGES
|
||||||
|
include(CheckIPOSupported)
|
||||||
|
check_ipo_supported(RESULT IPO_SUPPORTED OUTPUT IPO_OUTPUT)
|
||||||
|
mark_as_advanced( FORCE IPO_SUPPORTED )
|
||||||
|
if(IPO_SUPPORTED)
|
||||||
|
set( CMAKE_INTERPROCEDURAL_OPTIMIZATION ON )
|
||||||
|
set( CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON )
|
||||||
|
set( CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG OFF )
|
||||||
|
add_definitions( -DHAVE_IPO )
|
||||||
|
message(STATUS "Interprocedural optimization is supported")
|
||||||
|
else()
|
||||||
|
message(STATUS "Interprocedural optimization is not supported: ${IPO_OUTPUT}")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Use ccache if available
|
# Use ccache if available
|
||||||
find_program( CCACHE_PROGRAM ccache )
|
find_program( CCACHE_PROGRAM ccache )
|
||||||
mark_as_advanced( FORCE CCACHE_PROGRAM )
|
mark_as_advanced( FORCE CCACHE_PROGRAM )
|
||||||
|
@@ -41,10 +41,12 @@
|
|||||||
** process and the values HAVE_LRINT and HAVE_LRINTF are set accordingly in
|
** process and the values HAVE_LRINT and HAVE_LRINTF are set accordingly in
|
||||||
** the config.h file.
|
** the config.h file.
|
||||||
*/
|
*/
|
||||||
#if (defined (WIN32) || defined (_WIN32)) && defined(_MSC_VER) && defined(_M_IX86)
|
#if (defined (WIN32) || defined (_WIN32)) && defined(_MSC_VER) && defined(_M_IX86) && !defined(HAVE_IPO)
|
||||||
// As of Visual Studio 2019 16.9, these functions have been made intrinsic and the build
|
// As of Visual Studio 2019 16.9, these functions have been made intrinsic and the build
|
||||||
// will fail. Unfortunately, the intrinsic versions run a LOT slower than the ones
|
// will fail. Unfortunately, the intrinsic versions run a LOT slower than the ones
|
||||||
// below, so force the compiler to use ours instead.
|
// below, so force the compiler to use ours instead. However, we cannot do this if
|
||||||
|
// interprocedural optimization is turned on, because that will break the build because we are
|
||||||
|
// redefining a compiler library helper
|
||||||
#pragma function( lrint, lrintf )
|
#pragma function( lrint, lrintf )
|
||||||
|
|
||||||
// Including math.h allows us to use the inline assembler versions without
|
// Including math.h allows us to use the inline assembler versions without
|
||||||
|
2
vcpkg
2
vcpkg
Submodule vcpkg updated: 149fdbc442...b1ec341bb7
@@ -348,7 +348,7 @@ bn.ResetPrefs=Reset Preferences
|
|||||||
bs.ResetPrefs=Reset Preferences
|
bs.ResetPrefs=Reset Preferences
|
||||||
ca.ResetPrefs=Voleu restablir les preferències?
|
ca.ResetPrefs=Voleu restablir les preferències?
|
||||||
ca_ES0valencia.ResetPrefs=Reset Preferences
|
ca_ES0valencia.ResetPrefs=Reset Preferences
|
||||||
co.ResetPrefs=Reinizià e preferenze ?
|
co.ResetPrefs=Reinizià e preferenze ?
|
||||||
cs.ResetPrefs=Vynulovat nastavení?
|
cs.ResetPrefs=Vynulovat nastavení?
|
||||||
cy.ResetPrefs=Reset Preferences
|
cy.ResetPrefs=Reset Preferences
|
||||||
da.ResetPrefs=Gendan indstillinger?
|
da.ResetPrefs=Gendan indstillinger?
|
||||||
|
Reference in New Issue
Block a user