[Cmake-commits] [cmake-commits] king committed cmCoreTryCompile.cxx 1.15 1.16

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Oct 28 11:24:12 EDT 2009


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

Modified Files:
	cmCoreTryCompile.cxx 
Log Message:
Fix try_compile when file cannot be found

The try_compile() command's COPY_FILE option should not try to actually
copy the file if it cannot be found.  Some C runtime library's fopen
cannot handle an empty file name.


Index: cmCoreTryCompile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCoreTryCompile.cxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -C 2 -d -r1.15 -r1.16
*** cmCoreTryCompile.cxx	28 Sep 2009 15:42:07 -0000	1.15
--- cmCoreTryCompile.cxx	28 Oct 2009 15:24:08 -0000	1.16
***************
*** 318,322 ****
      if ((res==0) && (copyFile.size()))
        {
!       if(!cmSystemTools::CopyFileAlways(this->OutputFile.c_str(), 
                                          copyFile.c_str()))
          {
--- 318,323 ----
      if ((res==0) && (copyFile.size()))
        {
!       if(this->OutputFile.empty() ||
!          !cmSystemTools::CopyFileAlways(this->OutputFile.c_str(),
                                          copyFile.c_str()))
          {



More information about the Cmake-commits mailing list