1 一些连接
https://www.jianshu.com/p/f825f4343f10
https://blog.csdn.net/moonflyerj/article/details/79085042
2 报错
CMake Error at /usr/local/Cellar/cmake/3.11.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.11.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/local/Cellar/cmake/3.11.4/share/cmake/Modules/FindOpenMP.cmake:442 (find_package_handle_standard_args)
CMakeLists.txt:67 (find_package)
-- Configuring incomplete, errors occurred!
See also "/Users/hx133330/tools/LightGBM/build/CMakeFiles/CMakeOutput.log".
3解决办法
cmake -D CMAKE_C_COMPILER=/opt/local/bin/gcc-mp-4.7 -D CMAKE_CXX_COMPILER=/opt/local/bin/g++-mp-4.7 ..
CMake Error at /usr/local/Cellar/cmake/3.11.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.11.4/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/local/Cellar/cmake/3.11.4/share/cmake/Modules/FindOpenMP.cmake:442 (find_package_handle_standard_args)
CMakeLists.txt:67 (find_package)
-- Configuring incomplete, errors occurred!
See also "/Users/hx133330/tools/LightGBM/build/CMakeFiles/CMakeOutput.log".
You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_C_COMPILER= /opt/local/bin/gcc-mp-4.7
CMAKE_CXX_COMPILER= /opt/local/bin/g++-mp-4.7
-- Generating done
-- Build files have been written to:
/Users/name/tools/LightGBM/build