CMake Error: Incorrect Arguments in If Statements and Unmatched Endif Statements
It appears there are errors in the CMakeLists.txt file. Specifically, there are incorrect arguments in the 'if' statements and the 'endif' statements are not properly matched with the corresponding 'if' statements.
To fix these errors, you need to modify the CMakeLists.txt file.
For the first error, change the 'if' statement on line 114 from: 'if (GCC_VERSION VERSION_GREATER 4.5 OR GCC_VERSION VERSION_EQUAL 4.5)'
to: 'if (CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.5 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 4.5)'
For the second error, change the 'endif' statement on line 116 from: 'endif()'
to: 'endif() # if (GCC_VERSION VERSION_GREATER 4.5 OR GCC_VERSION VERSION_EQUAL 4.5)'
Similarly, for the third error, change the 'if' statement on line 117 from: 'if (GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)'
to: 'if (CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.8 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 4.8)'
And change the 'endif' statement on line 119 from: 'endif()'
to: 'endif() # if (GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)'
Once you have made these modifications, save the CMakeLists.txt file and try configuring again.
原文地址: https://www.cveoy.top/t/topic/m04D 著作权归作者所有。请勿转载和采集!