please make compile process fail if cmake version is less than 3.3.0
Created by: lcy-seso
- 为了引入 eigen,需要 cmake 的 interface-libraries,仅在 3.3.0 以上版本支持。https://github.com/PaddlePaddle/Paddle/blob/develop/cmake/external/eigen.cmake#L34
- 然而,在Paddle的camke文件中,当cmake 版本低于 3.3时会把
dummy_file
作为 static libraries 加入,https://github.com/PaddlePaddle/Paddle/blob/develop/cmake/external/eigen.cmake#L29- 这里为什么不让编译过程终止,提示用户升级cmake,而是添加一个 dummy file?
- 之前一段时间,引入了 eigen ,但是没有其它程序调用,编译过程并不会报错,但近期merge了framework 相关的代码,当cmake版本低于3.3.0时,链接阶段报错。
- 另外,将 cmake 升级到 3.9 之后,find boost库异常,输出如下,我还在检查,有信息会继续更新:
CMake Error in /home/caoying/opt/cmake/share/cmake-3.9/Modules/FindBoost.cmake:
cmake_policy PUSH without matching POP
Call Stack (most recent call first):
CMakeLists.txt:31 (find_package)
CMake Deprecation Warning at /home/caoying/opt/cmake/share/cmake-3.9/Modules/UseSWIG.cmake:226 (message):
SWIG_ADD_MODULE is deprecated. Use SWIG_ADD_LIBRARY instead.
Call Stack (most recent call first):
paddle/api/CMakeLists.txt:56 (SWIG_ADD_MODULE)