[cmake-developers] variables for top level project version

Daniel Pfeifer daniel at pfeifer-mail.de
Thu Aug 18 05:37:55 EDT 2016


Hi!

The project() command currently sets some variables in both
PROJECT_<var> and <project>_<var> form. So far good.

It also sets CMAKE_PROJECT_NAME to the top level project name.  This
is not documented.

It does not set any other variables of the form CMAKE_PROJECT_<var>.
This would be useful for the version variables.

CPack.cmake initializes CPACK_PACKAGE_NAME with ${CMAKE_PROJECT_NAME},
but it initializes CPACK_PACKAGE_VERSION with "0.1.1".  It should
initialize all version variables with the values from the top level
project() command.

Cheers, Daniel


More information about the cmake-developers mailing list