[Cmake-commits] [cmake-commits] alex committed cmExportFileGenerator.cxx 1.13 1.14
cmake-commits at cmake.org
cmake-commits at cmake.org
Sun Apr 27 07:30:48 EDT 2008
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv333
Modified Files:
cmExportFileGenerator.cxx
Log Message:
ENH: protect the export files against inclusion with cmake 2.4
Alex
Index: cmExportFileGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmExportFileGenerator.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -C 2 -d -r1.13 -r1.14
*** cmExportFileGenerator.cxx 31 Mar 2008 17:48:50 -0000 1.13
--- cmExportFileGenerator.cxx 27 Apr 2008 11:30:45 -0000 1.14
***************
*** 80,83 ****
--- 80,89 ----
std::ostream& os = *foutPtr;
+ // Protect that file against use with older CMake versions.
+ os << "# Generated by CMake " << cmVersion::GetCMakeVersion() << "\n\n";
+ os << "IF(\"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}\" LESS 2.5)\n"
+ << " MESSAGE(FATAL_ERROR \"CMake >= 2.6.0 required\")\n"
+ << "ENDIF(\"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}\" LESS 2.5)\n";
+
// Isolate the file policy level.
// We use 2.6 here instead of the current version because newer
More information about the Cmake-commits
mailing list