On 2014-01-10 11:01, Jean-Christophe Fillion-Robin wrote:
Would it make sense to have "project(Foo VERSION 1.2.3)" set the variables:
   ${PROJECT_NAME}_PROJECT_VERSION_(MAJOR|MINOR|PATCH|TWEAK)

That way, the variable would remain even if project is called with VERSION
in sub directory.

How is that different? Do you mean to drop the PROJECT_VERSION_{...} entirely? That doesn't seem desirable for symmetry with the other PROJECT_{...} variables.

I think I'm with Brad; set the PROJECT_VERSION_{...} and ${PROJECT_NAME}_VERSION_{...} (note; no extra literal 'PROJECT') as usual. Always. Whether or not VERSION was specified (i.e. unset the corresponding variables in such case).

Folks that use the PROJECT_{...} forms hopefully know what they are doing, otherwise people are hopefully using the ${PROJECT_NAME}_{...} forms instead.


Related: Do these affect the version properties of libraries? (Because OTOH if it does, I can imagine wanting to say VERSION once at the root and have it inherit downwards unless overridden. Maybe though that's a reason for it to not do so.)

--
Matthew

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to