I’m falling the bellow mentioned link to use vcpkg package manager in manifest mode.
https://learn.microsoft.com/en-us/vcpkg/get_started/get-started-vs?pivots=shell-cmd
In the CMakeUserPresets.json
I’m getting the bellow mentioned error.
I also tried providing the absolute path to my vcpkg.cmake
file.
I’ve created environment variable VCPKG_ROOT=C:vcpkg
CMakeUserPresets.json
{
"version": 2,
"configurePresets": [
{
"name": "default",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
//"CMAKE_TOOLCHAIN_FILE": "c:\vcpkg\scripts\buildsystems\vcpkg.cmake"
}
}
]
}
CMake Output
1> CMake generation started for configuration: 'default'.
1> Illegal characters in path.
Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.IO.Path.Combine(String path1, String path2)
at libcmake.RelativePathStringComparer.GetCanonicalPath(String path)
at libcmake.RelativePathStringComparer.Equals(String x, String y)
at libcmake.CMakeDaemonDriver.HasToolchainChanged(CMakeCommandLine cmdLine, String currentToolchain, List`1 messages, IEqualityComparer`1 comparer)
at libcmake.CMakeDaemonDriver.<DeleteCacheIfConsistencyCheckFailsAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at libcmake.CMakeListsParser.<SetAndCheckToolchainAsync>d__39.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at libcmake.CMakeListsParser.<ParseImplAsync>d__40.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at libcmake.CMakeListsParser.<ParseAsync>d__36.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.CMake.Project.ExternalBuildProject.ProjectProvider.<ParseProjectAsync>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.VisualStudio.CMake.Project.ExternalBuildProject.ProjectProvider.<ParseProjectAsync>d__46.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Workspace.ExternalBuildFramework.Impl.ParseCache.<ParseAsyncImpl>d__34.MoveNext()