为了让我自己回答这个问题,我浪费了一天时间,希望能省去其他人的麻烦。
设置:
post)
vcpkg替代版本,都会发生。如果您试图手动构建https://github.com/aws/aws-sdk-cpp .中提到的“第三方依赖关系”,也会发生这种情况。
你试着做这样的事情:
git clone https://github.com/aws/aws-sdk-cpp.git
cd aws-sdk-cpp
mkdir build
cd build
cmake ..你会收到来自cmake结尾的抱怨:
[...]
Performing configure step for 'AwsChecksums'
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.17763.
-- The C compiler identification is MSVC 19.27.29112.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done
CUSTOMBUILD : CMake error : install(EXPORT "aws-checksums-targets" ...) includes target "aws-checksums" more than once in the export set. [C:\Users\xyz\aws-sdk-cpp\build\.deps\AwsChecksums.vcxproj]
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
CMake Error at CMakeLists.txt:224 (message):
Failed to build third-party libraries.有一个类似的行读取CUSTOMBUILD : CMake error : install(EXPORT "aws-c-common-targets" ...) includes target "aws-c-common" more than once in the export set. [C:\Users\xyz\aws-sdk-cpp\build\.deps\AwsCCommon.vcxproj]
发布于 2020-10-23 20:39:17
完全不明显,但问题似乎是"cmake 3.19.0-rc1“。改为cmake 3.18.4绕过了这个问题。我不知道这是一个cmake问题还是sdk问题,或者我会在某人的github上发布,而不是堆栈溢出。
发布于 2021-03-25 18:02:45
我也遇到了同样的问题,我发现VisualStudio201916.9.1附带的CMake已经坏了(版本报告为3.19.20122902-MSVC_2)。
我将路径更改为CMake,指向Vcpkg使用的路径,这是3.19.2版本,现在它运行得很好。
因此,我假设bug在Visual附带的CMake中,并在3.19.2中修复。
https://stackoverflow.com/questions/64507009
复制相似问题