Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

CMake does not produce Makefile

I’m using VS Code on windows. I have a simple CMakelists.txt like this:

cmake_minimum_required(VERSION 3.0)

project(HelloWorld)

add_executable(HelloWorld main.cpp)

When I run it, it produces a bunch of build, vcxproj, etc. But it does not create any Makefile. So when I run make I get: make: *** No targets specified and no makefile found. Stop.

Here is a screenshot

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

screenshot

What is wrong here?

>Solution :

I think you should generate it with cmake -G "Unix Makefiles". It seems like now you have Visual Studio as a default build system. You can check all possible build systems with cmake –help.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading