0

I am new to using CMake. I installed the Windows binaries for CMake 3.22 and added it to my path during the setup process. I created a simple directory to do a test build, created and moved into a "build" directory, and ran "cmake .." but get the following error:

PS C:\test> cd build
PS C:\test\build> cmake ..
-- Building for: NMake Makefiles
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:/test/build/CMakeFiles/CMakeOutput.log".

Here is the CMakeLists.txt:

# Set Compiler Path
SET(CMAKE_C_COMPILER C:/MinGW/bin/gcc)
SET(CMAKE_CXX_COMPILER C:/MinGW/bin/g++)

# Set Minimum Required CMake Version
cmake_minimum_required(VERSION 3.22)

# set the project name and version
project(test_build VERSION 1.0)

# Specify the C++ standard
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)

# add the executable
add_executable(test test.cpp)

The CMakeOutput.log file constains:

The system is: Windows - 10.0.19043 - AMD64

Thanks for the help!

ParkerB7
  • 1
  • 1
  • 1

0 Answers0