本人嘗試編譯指定commit版本的MRPT庫,報錯以下,git
CMake Error at cmakemodules/script_detect_gcc.cmake:16 (LIST): list GET given empty list Call Stack (most recent call first): CMakeLists.txt:83 (include) CMake Error at cmakemodules/script_detect_gcc.cmake:17 (LIST): list GET given empty list Call Stack (most recent call first): CMakeLists.txt:83 (include)
注:本機gcc版本7.4.0,cmake版本3.5.1。github
錯誤排查流程:spa
1. 排查出報錯的位置。在 ./cmakemodules/script_detect_gcc.cmake 文件的16-17行。code
2. 嘗試描述該問題,即弄清楚問題是什麼——「cmake detect gcc version, get error 'list get given empty list' 」blog
3. 搜索該問題,一擊必中。ip
https://answers.opencv.org/question/65548/cmake-error-at-cmakeopencvdetectcxxcompilercmake/get