[CMake] (newbie Q) What does command PROJECT do?
Bill Hoffman
bill.hoffman at kitware.com
Fri Apr 11 20:52:24 EDT 2008
Jun Sun wrote:
> Initially I forgot to set PROJECT name, but it seems working just fine.
>
> Later on I thought it might be equivalent to the "project" concept
> in a whole Visual solution. So I started to put a bunch of "PROJECT"
> commands for every logical build unit. That seems to work too.
>
> Now I read the document. It say:
>
> Set a name for the entire project.
>
> Well, so should I just have one PROJECT command in the top-level
> CMakeLists.txt file? And exactly what does it do anyway? When does
> it matter?
>
You can have up to one project command per CMakeLists.txt file. CMake
will create a visual studio project for each of them in the directory of
the CMakeLists.txt file that has the project command.
-Bill
More information about the CMake
mailing list