[Cmake-commits] [cmake-commits] king committed cmCommand.h 1.27 1.28 cmMakefile.cxx 1.482 1.483 cmMakefile.h 1.235 1.236

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Sep 24 08:51:35 EDT 2008


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

Modified Files:
	cmCommand.h cmMakefile.cxx cmMakefile.h 
Log Message:
BUG: Skip a command if its arguments fail to parse

If the arguments to a command fail to parse correctly due to a syntax
error, the command should not be invoked.  This avoids problems created
by processing of commands with bad arguments.  Even though the build
system will not be generated, the command may affect files on disk that
persist across CMake runs.


Index: cmCommand.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCommand.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -C 2 -d -r1.27 -r1.28
*** cmCommand.h	1 Mar 2008 20:20:35 -0000	1.27
--- cmCommand.h	24 Sep 2008 12:51:33 -0000	1.28
***************
*** 65,69 ****
      {
      std::vector<std::string> expandedArguments;
!     this->Makefile->ExpandArguments(args, expandedArguments);
      return this->InitialPass(expandedArguments,status);
      }
--- 65,74 ----
      {
      std::vector<std::string> expandedArguments;
!     if(!this->Makefile->ExpandArguments(args, expandedArguments))
!       {
!       // There was an error expanding arguments.  It was already
!       // reported, so we can skip this command without error.
!       return true;
!       }
      return this->InitialPass(expandedArguments,status);
      }

Index: cmMakefile.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.h,v
retrieving revision 1.235
retrieving revision 1.236
diff -C 2 -d -r1.235 -r1.236
*** cmMakefile.h	25 Aug 2008 14:31:28 -0000	1.235
--- cmMakefile.h	24 Sep 2008 12:51:33 -0000	1.236
***************
*** 703,707 ****
     * variable replacement and list expansion.
     */
!   void ExpandArguments(std::vector<cmListFileArgument> const& inArgs,
                         std::vector<std::string>& outArgs);
    /**
--- 703,707 ----
     * variable replacement and list expansion.
     */
!   bool ExpandArguments(std::vector<cmListFileArgument> const& inArgs,
                         std::vector<std::string>& outArgs);
    /**

Index: cmMakefile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmMakefile.cxx,v
retrieving revision 1.482
retrieving revision 1.483
diff -C 2 -d -r1.482 -r1.483
*** cmMakefile.cxx	24 Sep 2008 12:51:19 -0000	1.482
--- cmMakefile.cxx	24 Sep 2008 12:51:33 -0000	1.483
***************
*** 2365,2369 ****
  }
  
! void cmMakefile::ExpandArguments(
    std::vector<cmListFileArgument> const& inArgs,
    std::vector<std::string>& outArgs)
--- 2365,2369 ----
  }
  
! bool cmMakefile::ExpandArguments(
    std::vector<cmListFileArgument> const& inArgs,
    std::vector<std::string>& outArgs)
***************
*** 2391,2394 ****
--- 2391,2395 ----
        }
      }
+   return !cmSystemTools::GetFatalErrorOccured();
  }
  



More information about the Cmake-commits mailing list