如果未传递INVERTED_FEATURES,则FEATURES关键字是可选的。 不推荐使用此行为。 如果多次传递相同的<feature-var>,则vcpkg_check_features会导致致命错误,因为这是一个 bug。 示例 示例1:常规功能 cmake $ ./vcpkginstallmimalloc[asm,secure]# ports/mimalloc/portfile.cmakevcpkg_check_features(OUT_FEATURE_OPTIONS...
以下使用vcpkg_check_features()的代碼段是相等的。 cmake vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES"zlib"CMAKE_REQUIRE_FIND_PACKAGE_ZLIB INVERTED_FEATURES"zlib"CMAKE_DISABLE_FIND_PACKAGE_ZLIB ) vcpkg_cmake_configure( SOURCE_PATH${SOURCE_PATH}OPTIONS${FEATURE_OPTIONS}) ...
Check Features Vcpkg_check_featuresis a new portfile function that checks if one or more features are a part of a package installation. In vcpkg we use features to enable optional capabilities offered by libraries. A user requests vcpkg to install. For example: Copy ~/vcpkg$ vcpkg install op...
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found ZLIB: optimized;E:/test_manifest/build/vcpkg_...
-- Checkforworking CXX compiler: C:/ProgramFiles (x86)/MicrosoftVisual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features -done -- Found ZLIB: optimized;E:/test_manifest/build/vcpkg_installed...
[DEBUG] Trying to hash C:\Code\vcpkg\scripts\cmake\vcpkg_check_features.cmake [DEBUG] C:\Code\vcpkg\scripts\cmake\vcpkg_check_features.cmake has hash 943b217e0968d64cf2cb9c272608e6a0b497377e792034f819809a79e1502c2b [DEBUG] Trying to hash C:\Code\vcpkg\scripts\cmake\vcpkg_check_linka...
-- Check for working CXX compiler: /usr/bin/g++-7 -skipped --Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting the C++ compiler inuse -- Detecting the C++ compiler in use - gcc -- Detecting the C++standard library ...
1> [CMake] -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe -skipped1> [CMake] -- Detecting Ccompile features1> [CMake] -- Detecting C compile features - done ...
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x86/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detected processor: AMD64 -- Performing Test HAVE_CXX_FP:...
Importantly, you will want to set “Use Vcpkg Manifest” to “Yes” if you intend to use vcpkg in manifest mode with your MSBuild project. Once this is turned on, if you have avcpkg.jsonfile in your project, vcpkg will automatically be called every time you do a build to check if ...