Another approach is be to use Azure Pipelines Artifacts with an ITK vcpkg (@dzenanz has contributed to this package configuration) generated binary. This example may help.
Thanks for your help so far @matt.mccormick I do like the option to use generated binaries for VS2017 (64-bit Release) but I still donāt really understand how. Currently we build ITK as follows, at elastix/Testing/CI/Azure/ci.yml:
The package comes with a CMAKE_TOOLCHAIN_FILE. We need to use this file for the elastix build so the compiler, toolchain, and relevant build settings are used to ensure the binaries are compatible. Set ITK_DIR to the vcpkg ITKConfig.cmake file path and CMAKE_TOOLCHAIN_FILE to the vcpkg file. A related section of the example:
The current version of elastix (git develop branch) still depends on the legacy interface of ITK 5. Unfortunately, the ITK portfile at github.com/microsoft/vcpkg removes the legacy support (ITK_LEGACY_REMOVE=ON):
Does this mean that currently, elastix cannot yet use vcpkg, on github azure CI?
Here is the azure-pipelines yml file I adapted in order to use vcpkg (elastix PR 161):
ITK port is far from set in stone. Make a PR which flips the legacy on.
The legacy there is off because I like to turn it off in order to avoid new features depending on legacy stuff. But for general use including legacy stuff should be beneficial.
Suppose one would need ITK built with different CMake options than another? (For example, suppose you would really need to have ITK_LEGACY_REMOVE=ON, while elastix needs to have the option OFF.) Could that possibly be supported by vcpkg?