From 69bb8fef9b3aa6109a3efd12834a206caad0c0ed Mon Sep 17 00:00:00 2001 From: David Capello Date: Mon, 5 Oct 2015 21:19:11 -0300 Subject: [PATCH] Add flag to improve linking times when we use the Skia port --- src/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2aa2771ad..ee0f6946f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -14,6 +14,12 @@ endif() # Compiler-specific flags if(MSVC) + # As Skia is compiled with /GL flag (whole program optimization), + # the linker prefer a /LTCG parameter to improve link times. + if(USE_SKIA_BACKEND) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LTCG") + endif() + # Do not link with libcmt.lib (to avoid duplicated symbols with msvcrtd.lib) if(CMAKE_BUILD_TYPE STREQUAL Debug) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT")