소스 검색

cmRST: Substitute CMake version for |release| as Sphinx does

Sphinx provides a builtin substitution for the |release| version.
Teach cmRST to replace this with the CMake version number too.
Brad King 12 년 전
부모
커밋
89448a5bad
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      Source/cmRST.cxx

+ 2 - 0
Source/cmRST.cxx

@@ -12,6 +12,7 @@
 #include "cmRST.h"
 
 #include "cmSystemTools.h"
+#include "cmVersion.h"
 
 #include <ctype.h>
 
@@ -41,6 +42,7 @@ cmRST::cmRST(std::ostream& os, std::string const& docroot):
                "((\\|[^| \t\r\n]([^|\r\n]*[^| \t\r\n])?\\|)(__|_|))"
                "([^A-Za-z0-9_]|$)")
 {
+  this->Replace["|release|"] = cmVersion::GetCMakeVersion();
 }
 
 //----------------------------------------------------------------------------