Skip to content

Commit 9562103

Browse files
committed
Use whole program optimization
1 parent 9160a61 commit 9562103

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ if (${VCPKG_TARGET_TRIPLET} MATCHES ".*-static")
6565
foreach(CompilerFlag ${CompilerFlags})
6666
string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
6767
endforeach()
68+
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL")
69+
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /GL")
70+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LTCG")
6871
# Need explicit dependencies on wx's dependencies
6972
find_package(png REQUIRED)
7073
find_package(tiff REQUIRED)

CMakeSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
{
5252
"name": "x86-Release-static",
5353
"generator": "Ninja",
54-
"configurationType": "RelWithDebInfo",
54+
"configurationType": "Release",
5555
"buildRoot": "${projectDir}\\out\\build\\${name}",
5656
"installRoot": "${projectDir}\\out\\install\\${name}",
5757
"cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x86-windows-static",

0 commit comments

Comments
 (0)