summaryrefslogtreecommitdiff
path: root/pgosupport.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'pgosupport.cmake')
-rw-r--r--pgosupport.cmake8
1 files changed, 5 insertions, 3 deletions
diff --git a/pgosupport.cmake b/pgosupport.cmake
index 1f8ee9c8db..f3d00b7505 100644
--- a/pgosupport.cmake
+++ b/pgosupport.cmake
@@ -15,12 +15,14 @@ function(add_pgo TargetName)
endif(WIN32)
set(CLR_CMAKE_OPTDATA_PACKAGEWITHRID "optimization.${CLR_CMAKE_TARGET_OS}-${CLR_CMAKE_TARGET_ARCH}.PGO.CoreCLR")
+
+ # On case-sensitive file systems, NuGet packages are restored to lowercase paths
+ string(TOLOWER "${CLR_CMAKE_OPTDATA_PACKAGEWITHRID}/${CLR_CMAKE_OPTDATA_VERSION}" OptDataVersionedSubPath)
+
file(TO_NATIVE_PATH
- "${CLR_CMAKE_PACKAGES_DIR}/${CLR_CMAKE_OPTDATA_PACKAGEWITHRID}/${CLR_CMAKE_OPTDATA_VERSION}/data/${ProfileFileName}"
+ "${CLR_CMAKE_PACKAGES_DIR}/${OptDataVersionedSubPath}/data/${ProfileFileName}"
ProfilePath
)
- # NuGet packages are restored to lowercase paths
- string(TOLOWER "${ProfilePath}" ProfilePath)
if(CLR_CMAKE_PGO_INSTRUMENT)
if(WIN32)