This fixes building the project on systems where there is a space in the path of the user. For example on Windows where the user might (hypothetically) be called 'Marius Gundersen' and the path to their user folder is `C:\Users\Marius Gundersen\` the build would fail
This fixes #32165
message("PGO data file NOT found: ${ProfilePath}")
else(NOT EXISTS ${ProfilePath})
if(CLR_CMAKE_HOST_WIN32)
- set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS_RELEASE " /LTCG /USEPROFILE:PGD=${ProfilePath}")
- set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS_RELWITHDEBINFO " /LTCG /USEPROFILE:PGD=${ProfilePath}")
+ set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS_RELEASE " /LTCG /USEPROFILE:PGD=\"${ProfilePath}\"")
+ set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS_RELWITHDEBINFO " /LTCG /USEPROFILE:PGD=\"${ProfilePath}\"")
else(CLR_CMAKE_HOST_WIN32)
if(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELEASE OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELWITHDEBINFO)
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.6)