How do I remove this Cmake error while building a simulator for movesense

507 Views Asked by At

I am trying to build the simulator for movesense using the link hereenter link description here.

root@51d079e11330:/movesense/simbuild# cmake -G "Visual Studio 15 2017" -DMOVESENSE_CORE_LIBRARY=../MovesenseCoreLib/ -DCMAKE_BUILD_TYPE=Release ../samples/blinky_app

I get the following error:

CMake Error: Could not create named generator Visual Studio 15 2017

Generators
* Unix Makefiles               = Generates standard UNIX makefiles.
  Green Hills MULTI            = Generates Green Hills MULTI files
                                 (experimental, work-in-progress).
  Ninja                        = Generates build.ninja files.
  Watcom WMake                 = Generates Watcom WMake makefiles.
  CodeBlocks - Ninja           = Generates CodeBlocks project files.
  CodeBlocks - Unix Makefiles  = Generates CodeBlocks project files.
  CodeLite - Ninja             = Generates CodeLite project files.
  CodeLite - Unix Makefiles    = Generates CodeLite project files.
  Sublime Text 2 - Ninja       = Generates Sublime Text 2 project files.
  Sublime Text 2 - Unix Makefiles
                               = Generates Sublime Text 2 project files.
  Kate - Ninja                 = Generates Kate project files.
  Kate - Unix Makefiles        = Generates Kate project files.
  Eclipse CDT4 - Ninja         = Generates Eclipse CDT 4.0 project files.
  Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files.
1

There are 1 best solutions below

3
On

Either your version of CMake is way too old (so it doesn't support Visual Studio) or, more likely, you are not running it on Windows.

CMake will only generate a project format that is supported by the platform you are running CMake on. For instance, on macOS, it gives exactly the options you are seeing, but on Windows you can also generate projects for Borland, Visual Studio, MinGW etc.