From: Marius Gundersen Date: Sun, 16 Feb 2020 04:43:40 +0000 (+0100) Subject: Fix build on systems with space in path (#32169) X-Git-Tag: submit/tizen/20210909.063632~9708 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=924347639f5d8f76ff4e84486fe077db12f81f0a;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Fix build on systems with space in path (#32169) 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 --- diff --git a/src/coreclr/pgosupport.cmake b/src/coreclr/pgosupport.cmake index 7e24b7d2f21..4b119809017 100644 --- a/src/coreclr/pgosupport.cmake +++ b/src/coreclr/pgosupport.cmake @@ -30,8 +30,8 @@ function(add_pgo TargetName) 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)