7e142c5ac2
Teach the project() command to set variables {PROJECT,<PROJECT-NAME>}_VERSION{,_MAJOR,_MINOR,_PATCH,_TWEAK} holding the project version number and its components. Add project() command option "VERSION" to specify the version explicitly, and default to the empty string when it is not given. Since this clears variables when no VERSION is given, this may change behavior for existing projects that set the version variables themselves prior to calling project(). Add policy CMP0048 for compatibility. Suggested-by: Alex Neundorf <neundorf@kde.org>
18 lines
407 B
CMake
18 lines
407 B
CMake
include(RunCMake)
|
|
|
|
run_cmake(LanguagesImplicit)
|
|
run_cmake(LanguagesEmpty)
|
|
run_cmake(LanguagesNONE)
|
|
run_cmake(LanguagesTwice)
|
|
run_cmake(VersionAndLanguagesEmpty)
|
|
run_cmake(VersionEmpty)
|
|
run_cmake(VersionInvalid)
|
|
run_cmake(VersionMissingLanguages)
|
|
run_cmake(VersionMissingValueOkay)
|
|
run_cmake(VersionTwice)
|
|
|
|
run_cmake(CMP0048-OLD)
|
|
run_cmake(CMP0048-OLD-VERSION)
|
|
run_cmake(CMP0048-WARN)
|
|
run_cmake(CMP0048-NEW)
|