c++visual-c++cmakefollyvcpkg

Installing Folly (c++ library) gives an error via vcpkg


I am trying to build folly library which is a c++ library and tried to install it via vcpkg.

It downloaded all the dependencies and installed the dependent boost libraries as well.

But it gives an error for in the last step which is installing the folly.

I have used the following command:

.\vcpkg.exe install folly:x64-windows

It has giving the following error:

CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:56 (message):
Command failed: ninja;-v
Working Directory: D:/C++Examples/Vcpkg/buildtrees/folly/x64-windows-rel/vcpkg-parallel-configure
See logs for more information:
  D:\C++Examples\Vcpkg\buildtrees\folly\config-x64-windows-out.log

Call Stack (most recent call first):
   scripts/cmake/vcpkg_configure_cmake.cmake:237    (vcpkg_execute_required_process)
   ports/folly/portfile.cmake:57 (vcpkg_configure_cmake)
   scripts/ports.cmake:72 (include)


Error: Building package folly:x64-windows failed with: BUILD_FAILED

Here is the log file level details of the issue:

CMake Error at CMake/FollyFunctions.cmake:81 (if):
if given arguments:

"D:/C++Examples/Vcpkg/buildtrees/folly/src/8.05.14.00-e96738be27/folly/Benchmark.cpp" "MATCHES" "^D:/C++Examples/Vcpkg/buildtrees/folly/src/8.05.14.00-e96738be27/folly/build/"

Regular expression
"^D:/C++Examples/Vcpkg/buildtrees/folly/src/8.05.14.00-e96738be27/folly/build/"
cannot compile
Call Stack (most recent call first):
CMakeLists.txt:101 (REMOVE_MATCHES_FROM_LISTS)

Do you have any idea how can i handle this issue?


Solution

  • Regular expression

    ^D:/C++Examples/Vcpkg/buildtrees/folly/src/8.05.14.00-e96738be27/folly/build/
    

    is invalid, because "+" character has special meaning for regular expressions, and "++" combination is meaningless(incorrect).

    Looks like the project's CMakeLists.txt expects path to not contain regular-expression-specific characters.

    Try to use another path for build the project, without "+" character in it.