diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx index 68179d455f..2d49ee02cf 100644 --- a/Source/cmProjectCommand.cxx +++ b/Source/cmProjectCommand.cxx @@ -243,7 +243,7 @@ bool cmProjectCommand(std::vector 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();