pytorch
0561e104 - fix build error when system cmake3 version >=3.5 but <=3.10 (#64914)

Commit
3 years ago
fix build error when system cmake3 version >=3.5 but <=3.10 (#64914) Summary: For PyTorch source build using conda, there will raise an error in https://github.com/pytorch/pytorch/blob/8535418a06d75025541370cc656a8b6a0330ca0d/CMakeLists.txt#L1 when we get a CMake version < 3.10, it can be fixed by upgrade CMake in conda env, but for centos, there has CMake3, PyTorch fist check whether CMake3's verison<=3.5, so if user's system camke<= 3.5, PyTorch will use the system's cmake3, which will have build error like: ``` CMake Error at CMakeLists.txt:1 (cmake_minimum_required): CMake 3.10 or higher is required. You are running version 3.6.3 -- Configuring incomplete, errors occurred! ``` we need to check CMake3 also >=3.10, if not, then check conda's CMake version. Pull Request resolved: https://github.com/pytorch/pytorch/pull/64914 Reviewed By: jbschlosser Differential Revision: D30901673 Pulled By: ezyang fbshipit-source-id: 064e2c5bc0b9331d6ecd65cd700e5a42c3403790
Author
Parents
Loading