Search code examples
cmakeconan

Is there a way to tell conan to use different cmake executable durning conan install?


When I install dependencies using conan install --build=missing conan executes cmake executable to build them if they are missing. But if I have two different versions of cmake installed in the system, cmake and cmake3, what can I do to force conan to use cmake3 binary?


Solution

  • I've figured it out. You can set an environment variable CONAN_CMAKE_PROGRAM to tell conan to use different cmake executable.

    https://github.com/conan-io/conan/blob/7387805817aa50ad8545549b66be725f38ddb143/conans/client/build/cmake.py#L52