Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vcpkg] Fix toolsrc CMake build error #10973

Merged

Conversation

NancyLi1013
Copy link
Contributor

@NancyLi1013 NancyLi1013 commented Apr 23, 2020

Currently, using CMake to build vcpkg/toolsrc project with MSVC cmake ninja, It will fail:

F:\test\vcpkg\toolsrc\build>cmake --build .
[0/2] Re-checking globbed directories...
[24/96] Building CXX object CMakeFiles\vcpkglib.dir\src\vcpkg\base\files.cpp.obj
FAILED: CMakeFiles/vcpkglib.dir/src/vcpkg/base/files.cpp.obj
"E:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\bin\Hostx64\x86\cl.exe"  /nologo /TP -DVCPKG_DISABLE_METRICS=0 -DVCPKG_USE_STD_FILESYSTEM=1 -I..\include /DWIN32 /D_WINDOWS  /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1   -FC -permissive- -utf-8 -W4 -WX /Yupch.h /FIpch.h /Zm200 -std:c++17 /showIncludes /FoCMakeFiles\vcpkglib.dir\src\vcpkg\base\files.cpp.obj /FdCMakeFiles\vcpkglib.dir\ /FS -c ..\src\vcpkg\base\files.cpp
F:\test\vcpkg\toolsrc\src\vcpkg\base\files.cpp(725): error C2039: 'system_complete': is not a member of 'std::filesystem'
E:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.25.28610\include\fstream(28): note: see declaration of 'std::filesystem'
F:\test\vcpkg\toolsrc\src\vcpkg\base\files.cpp(725): error C3861: 'system_complete': identifier not found
[26/96] Building CXX object CMakeFiles\vcpkglib.dir\src\vcpkg\base\system.cpp.obj
ninja: build stopped: subcommand failed.

It seems to be related with this PR #10817.

I update USE_STD_FILESYSTEM as VCPKG_USE_STD_FILESYSTEM, which can build without any error.

Related issue #10957.

@NancyLi1013 NancyLi1013 added the info:internal This PR or Issue was filed by the vcpkg team. label Apr 23, 2020
@strega-nil strega-nil marked this pull request as ready for review April 23, 2020 17:33
Copy link
Contributor

@strega-nil strega-nil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good; we really need to update our CI to actually build all of the things, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info:internal This PR or Issue was filed by the vcpkg team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants