[cmake-developers] RFC: add version to project() call

Matthew Woehlke mw_triad at users.sourceforge.net
Tue Jan 14 14:18:06 EST 2014


On 2014-01-14 14:11, Daniel Pfeifer wrote:
> 2014/1/14 Matthew Woehlke <mw_triad at users.sourceforge.net>:
>> @Daniel, there is a CMAKE_PROJECT_NAME?
>
> http://cmake.org/cmake/help/v2.8.12/cmake.html#variable:CMAKE_PROJECT_NAME
> http://cmake.org/cmake/help/v2.8.12/cmake.html#variable:PROJECT_NAME
>
> The documentation for both variables is misleading. As far as I
> understand it, PROJECT_NAME is the name of the current project, while
> CMAKE_PROJECT_NAME us the name of the top-level project.

Ah, I see. I always use PROJECT_NAME as a way of not repeating the name 
of the target being built (this is in a project that generally has one 
library or executable per directory, and calls project() for each of them).

In that case, I'd think CMAKE_PROJECT_VERSION would not be the correct 
thing to set (except maybe for the very first project() seen). Else I 
think we'd risk making this even more confusing ;-).

-- 
Matthew




More information about the cmake-developers mailing list