问题
I am trying to install LightGBM in windows 10 using cmake.
I am following the process given on this link
on this command
cmake -DCMAKE_GENERATOR_PLATFORM=x64 ..
it gives the error saying
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".
I'm new to this, since I've never used cmake before.
can someone give me some insights about what parameter i need to add in cmake command?
回答1:
Platform specification is mainly used for Visual Studio generator. Sometimes, CMake uses this generator by default. In other cases, you need to specify generator explicitly, with -G
option:
cmake -G "Visual Studio 15 2017" -DCMAKE_GENERATOR_PLATFORM=x64 ..
(Make sure that generator corresponds to the Visual Studio which you actually have. See list of Visual Studio generators supported by CMake.)
来源:https://stackoverflow.com/questions/54742269/lightgbm-windows-installation-issue-cmake-does-not-support-platform-specific