mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
CMake (MSVC): Make Zi default debug info flag
This restores the original debug-flag for CMake builds on Windows.
This commit is contained in:
parent
20b6a2c290
commit
4a79bc5cfd
2 changed files with 32 additions and 1 deletions
|
|
@ -2,6 +2,37 @@
|
||||||
|
|
||||||
# develop
|
# develop
|
||||||
|
|
||||||
|
## Change
|
||||||
|
|
||||||
|
The "Debug Information Format" flag has been changed to "/Zi" from "/Z7" when
|
||||||
|
building JUCE on Windows using CMake.
|
||||||
|
|
||||||
|
**Possible Issues**
|
||||||
|
|
||||||
|
Some CI tooling (e.g., sscache) may experience issues writing debug information.
|
||||||
|
Debug information will no longer be stored inside the object files during the
|
||||||
|
build process.
|
||||||
|
|
||||||
|
**Workaround**
|
||||||
|
|
||||||
|
You can override the "Debug Information Format" flag with the
|
||||||
|
"CMAKE_MSVC_DEBUG_INFORMATION_FORMAT" which is available under policy "CMP0141".
|
||||||
|
|
||||||
|
This can be enabled at configuration time:
|
||||||
|
-DCMAKE_POLICY_DEFAULT_CMP0141=NEW
|
||||||
|
-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded (for "/Z7")
|
||||||
|
or
|
||||||
|
-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=ProgramDatabase (for "/Zi")
|
||||||
|
|
||||||
|
**Rationale**
|
||||||
|
|
||||||
|
The previous change to "/Z7" for the "Debug Information Format" flag caused
|
||||||
|
build artefacts to drastically increase in size in some configurations, which
|
||||||
|
could lead to build failures. In particular, when link-time code-generation is
|
||||||
|
enabled, .obj files generated with the debug info mode set to "Z7" or "None"
|
||||||
|
may be much larger than when using "Zi" instead.
|
||||||
|
|
||||||
|
|
||||||
## Change
|
## Change
|
||||||
|
|
||||||
The AudioFormat class now only has one virtual createWriterFor member function:
|
The AudioFormat class now only has one virtual createWriterFor member function:
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") OR (CMAKE_CXX_COMPILER_FRONTEND_VARIA
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(needs_debug_flag)
|
if(needs_debug_flag)
|
||||||
target_compile_options(juce_recommended_config_flags INTERFACE $<${debug_config}:/Z7>)
|
target_compile_options(juce_recommended_config_flags INTERFACE $<${debug_config}:/Zi>)
|
||||||
endif()
|
endif()
|
||||||
elseif((CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
elseif((CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue