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
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.
With this line, all vcpkg's dependency will be built and cached with sanitizer feature.
If I later run:
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