MSVC: Don't share pch between debug and release builds.

Precompiled headers were sharing the PCH file between debug and
release builds which is 'bad'. Adding the configuration to the
path fixes the issue.

Reported on chat by @mano-wii
This commit is contained in:
Ray molenkamp 2019-06-25 15:27:21 -06:00
parent 7037ff9204
commit 9ab0247b6e
Notes: blender-bot 2023-02-14 06:21:59 +01:00
Referenced by issue #66366, multi object edit makes blender crash
Referenced by issue #66156, ctest: script_load_addons fails (again)
1 changed files with 1 additions and 1 deletions

View File

@ -1243,7 +1243,7 @@ macro(blender_precompile_headers target cpp header)
if(MSVC)
# get the name for the pch output file
get_filename_component( pchbase ${cpp} NAME_WE )
set( pchfinal "${CMAKE_CURRENT_BINARY_DIR}/${pchbase}.pch" )
set( pchfinal "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${pchbase}.pch" )
# mark the cpp as the one outputting the pch
set_property(SOURCE ${cpp} APPEND PROPERTY OBJECT_OUTPUTS "${pchfinal}")