Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
02f770d0
Commit
02f770d0
authored
Sep 01, 2015
by
Wenzel Jakob
Browse files
win32 compilation flag improvements
parent
2b0339f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
CMakeLists.txt
CMakeLists.txt
+3
-1
No files found.
CMakeLists.txt
View file @
02f770d0
...
...
@@ -69,7 +69,9 @@ set_target_properties(example PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOUR
if
(
WIN32
)
if
(
MSVC
)
# 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"
)
endif
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment