Commit 02f770d0 by Wenzel Jakob

win32 compilation flag improvements

parent 2b0339f4
...@@ -69,7 +69,9 @@ set_target_properties(example PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOUR ...@@ -69,7 +69,9 @@ set_target_properties(example PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOUR
if (WIN32) if (WIN32)
if (MSVC) if (MSVC)
# Enforce size-based optimization and link time code generation on MSVC (~30% smaller binaries in experiments) # Enforce size-based optimization and link time code generation on MSVC (~30% smaller binaries in experiments)
set_target_properties(example PROPERTIES COMPILE_FLAGS "/Os /GL") # /bigobj is needed for bigger binding projects due to the limit to 64k addressable sections
# /MP enables multithreaded builds
set_target_properties(example PROPERTIES COMPILE_FLAGS "/Os /GL /MP /bigobj")
set_target_properties(example PROPERTIES LINK_FLAGS "/LTCG") set_target_properties(example PROPERTIES LINK_FLAGS "/LTCG")
endif() endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment