0

I tried a lot of solutions, but still I'm getting one error like 'nmake' '-?', I want to know should I install something. And the context is I'm trying to learn cmake by installing tutorial repository and going through the instructions. Cmake Step 1

cmakelists.txt

cmake_minimum_required(VERSION 3.10)

set(CMAKE_CXX_COMPILER "C:/hb_tools/hb_tools_portable/trunk/MinGW/bin/g++.exe")
set(CMAKE_C_COMPILER "C:/hb_tools/hb_tools_portable/trunk/MinGW/bin/gcc.exe")
SET (CMAKE_C_COMPILER_WORKS 1)
SET (CMAKE_CXX_COMPILER_WORKS 1)
project(Tutorial)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)


add_executable(Tutorial tutorial.cxx)

Terminal CMake Error at CMakeLists.txt:9 (project): Running

   'nmake' '-?'

  failed with:

   The system cannot find the file specified


Configuring incomplete, errors occurred!
See also "C:/Users/BALAVIJ/Downloads/cmake-3.25.0-rc1-tutorial-source/cmake-3.25.0-rc1-tutorial-source/Step1_build/CMakeFiles/CMakeOutput.log".
V B
  • 75
  • 5
  • CMake tutorial definitely doesn't suggest to specify compiler (`CMAKE_CXX_COMPILER`) in the `CMakeLists.txt`. You probably wanted to set [generator](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html) to "MinGW Makefiles", as described in [that answer](https://stackoverflow.com/a/69418114/3440745) to the duplicate question. – Tsyvarev Oct 16 '22 at 15:10

0 Answers0