Skip to content

ABI Hash should contains env var used by CMake #1846

@bansan85

Description

@bansan85

Under Linux, it's possible to pass environment variables to CMake though vcpkg. It's not possible under Windows except with VCPKG_ENV_PASSTHROUGH.

So I can build a C++/CMake project that uses vcpkg.json with the following command.

CXXFLAGS="/fsanitize=address" cmake ...... "-DCMAKE_TOOLCHAIN_FILE=D:/vcpkg/scripts/buildsystems/vcpkg.cmake"

With this line, all vcpkg's dependency will be built and cached with sanitizer feature.

If I later run:

cmake ...... "-DCMAKE_TOOLCHAIN_FILE=D:/vcpkg/scripts/buildsystems/vcpkg.cmake"

without sanitizer, the cache will be restored with sanitizer feature.

I suggest that all environment variables used by CMake must be used to compute ABI Hash

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions