[cmake-commits] martink committed cmGetSourceFilePropertyCommand.cxx 1.10 1.11

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Jul 10 14:05:08 EDT 2007


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv20113

Modified Files:
	cmGetSourceFilePropertyCommand.cxx 
Log Message:
ENH: added some documentation to explain a section of code a bit better


Index: cmGetSourceFilePropertyCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmGetSourceFilePropertyCommand.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- cmGetSourceFilePropertyCommand.cxx	18 Jun 2007 15:59:23 -0000	1.10
+++ cmGetSourceFilePropertyCommand.cxx	10 Jul 2007 18:05:06 -0000	1.11
@@ -40,7 +40,14 @@
     {
     if(args[2] == "LOCATION")
       {
-      // Make sure the location is known.
+      // Make sure the location is known.  Update: this is a hack to work
+      // around a problem with const methods in cmSourceFile, by design
+      // GetProperty("LOCATION") should work but right now it has to be
+      // "primed" by calling GetFullPath() first on a non-const cmSourceFile
+      // instance. This is because LOCATION is a computed-on-demand
+      // property. Either GetProperty needs to be non-const or the map
+      // needs to be changed to be mutable etc. for computed properties to
+      // work properly.
       sf->GetFullPath();
       }
     const char *prop = sf->GetProperty(args[2].c_str());



More information about the Cmake-commits mailing list