-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solve warnings with PDB flags override #3296
Solve warnings with PDB flags override #3296
Conversation
cmake/os_flags.cmake
Outdated
@@ -217,7 +217,7 @@ if(WIN32) | |||
# Compiler specific flags | |||
|
|||
ie_add_compiler_flags(/bigobj) | |||
ie_add_compiler_flags(/MP) | |||
ie_add_compiler_flags(/MP /FS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from https://docs.microsoft.com/en-us/cpp/build/reference/fs-force-synchronous-pdb-writes?view=msvc-160:
The /MP option enables /FS by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and in the same time it doesn't work as we can see in build results for commit d39f54d
@@ -126,6 +126,11 @@ function(addIeTarget) | |||
ie_developer_export_targets(${ARG_NAME} ${ARG_EXPORT_DEPENDENCIES}) | |||
endif() | |||
endif() | |||
if(WIN32) | |||
# Provide default compile pdb name equal to target name | |||
set_target_properties(${ARG_NAME} PROPERTIES COMPILE_PDB_NAME ${ARG_NAME}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is PDB name by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you specify a path name that does not include a file name (the path ends in backslash), the compiler creates a .pdb file named VCx0.pdb in the specified directory.
in our case vc140.pdb for all targets, because on root level cmake we specifiy CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY
only
* resolve clash of tests compile pdb file names * Solving problem using different way * resolve duplicate flags for gtest
* resolve clash of tests compile pdb file names * Solving problem using different way * resolve duplicate flags for gtest
* resolve clash of tests compile pdb file names * Solving problem using different way * resolve duplicate flags for gtest
* resolve clash of tests compile pdb file names * Solving problem using different way * resolve duplicate flags for gtest
* resolve clash of tests compile pdb file names * Solving problem using different way * resolve duplicate flags for gtest
First attempt to solve this issue in #3265 by setting flags on cmake level didn't work well with ninja.
This is second attempt where CMake files has been updated to remove /Zi flags and use /Z7 everywhere.