Skip to content

Commit

Permalink
Use whole program optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
twanvl committed May 10, 2020
1 parent 9160a61 commit 9562103
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ if (${VCPKG_TARGET_TRIPLET} MATCHES ".*-static")
foreach(CompilerFlag ${CompilerFlags})
string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
endforeach()
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /GL")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LTCG")
# Need explicit dependencies on wx's dependencies
find_package(png REQUIRED)
find_package(tiff REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion CMakeSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
{
"name": "x86-Release-static",
"generator": "Ninja",
"configurationType": "RelWithDebInfo",
"configurationType": "Release",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "-DVCPKG_TARGET_TRIPLET=x86-windows-static",
Expand Down

0 comments on commit 9562103

Please sign in to comment.