LightGBM windows 安装问题 - cmake - 不支持平台规范

LightGBM windows installation issue - cmake - does not support platform specification

我正在尝试使用 cmake 在 windows10 中安装 LightGBM。

我正在按照此 link

给出的流程进行操作

在此命令上

cmake -DCMAKE_GENERATOR_PLATFORM=x64 ..

它给出错误说

CMake Error at CMakeLists.txt:7 (PROJECT):

  Generator

NMake Makefiles

  does not support platform specification, but platform

x64

  was specified.


CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "C:/Users/meetp/LightGBM/build/CMakeFiles/CMakeOutput.log".

我是新手,因为我以前从未使用过 cmake。

有人可以告诉我一些关于我需要在 cmake 命令中添加什么参数的见解吗?

平台规范主要用于Visual Studio生成器。有时,CMake 默认使用这个生成器。在其他情况下,您需要明确指定生成器 ,使用 -G 选项:

cmake -G "Visual Studio 15 2017" -DCMAKE_GENERATOR_PLATFORM=x64 ..

(确保生成器对应于您实际拥有的 Visual Studio。请参阅 CMake 支持的 list of Visual Studio generators。)