Cmake creates a visual studio command line solution

I am using cmake 2.6.4 WinXP Pro Compilation on Visual Studio 2008 VC Express Version

I can create solution files using cmake-GUI. However, I do not want to use cmake-GUI, as I always prefer the command line.

However, I had a problem creating the solution file from the command line.

I am doing "off source" and this is my directory structure:

project/
    src/
    build/

I can run cmake from the build directory.

cmake ../src

However, when I try to do this:

cmake ../src --visual studio 2008

It does not work and does not create solution files.

Am I doing something wrong?

Thanks so much for any suggestions,

+3
source share
2 answers

Yes, you are doing it wrong. Try calling

cmake

, .

:

cmake -G "Visual Studio 9 2008" ..\src
+10

cmake , . -G, .

.

0

Source: https://habr.com/ru/post/1733125/


All Articles