mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-02 04:02:23 +03:00
project: Fix handling of COMPAT_VERSION
In cmProjectCommand, after validating the VERSION, we move it into a local variable. Later, however, we were comparing COMPAT_VERSION against the VERSION stored in the arguments. Compare to the local variable instead.
This commit is contained in:
1 parent
9ffbef62ca
commit
09701440d9
1 file changed
+1
-1
@@ -243,7 +243,7 @@ bool cmProjectCommand(std::vector<std::string> const& args,
|
||||
}
|
||||
|
||||
if (cmSystemTools::VersionCompareGreater(*prArgs.CompatVersion,
|
||||
*prArgs.Version)) {
|
||||
version_string)) {
|
||||
mf.IssueMessage(MessageType::FATAL_ERROR,
|
||||
"COMPAT_VERSION must be less than or equal to VERSION");
|
||||
cmSystemTools::SetFatalErrorOccurred();
|
||||
|
||||
Reference in new issue
Block a user