[Cmake-commits] [cmake-commits] king committed cmLocalGenerator.cxx 1.313 1.314
cmake-commits at cmake.org
cmake-commits at cmake.org
Sat Sep 19 10:14:36 EDT 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv14967/Source
Modified Files:
cmLocalGenerator.cxx
Log Message:
Fix check for -isysroot on OS X
Previously we checked for this flag by parsing the version number of GCC
out of 'gcc --version', but this is not reliable because the format can
vary greatly. Now we run 'gcc -v --help' and look for '-isysroot' in
the list of options.
We also now store the result on a per-language basis in the per-compiler
info file "CMake<LANG>Compiler.cmake". This is necessary to make it
accessible from try-compile projects so that they generate correctly.
Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.313
retrieving revision 1.314
diff -C 2 -d -r1.313 -r1.314
*** cmLocalGenerator.cxx 18 Sep 2009 19:16:33 -0000 1.313
--- cmLocalGenerator.cxx 19 Sep 2009 14:14:31 -0000 1.314
***************
*** 1761,1771 ****
const char* deploymentTarget =
this->Makefile->GetDefinition("CMAKE_OSX_DEPLOYMENT_TARGET");
! const char* gccHasIsysroot =
! this->Makefile->GetRequiredDefinition("CMAKE_OSX_GCC_SUPPORT_ISYSROOT");
! bool hasIsysroot = true;
! if(cmSystemTools::IsOff(gccHasIsysroot))
! {
! hasIsysroot = false;
! }
bool flagsUsed = false;
if(osxArch && sysroot && lang && (lang[0] =='C' || lang[0] == 'F'))
--- 1761,1766 ----
const char* deploymentTarget =
this->Makefile->GetDefinition("CMAKE_OSX_DEPLOYMENT_TARGET");
! std::string isysrootVar = std::string("CMAKE_") + lang + "_HAS_ISYSROOT";
! bool hasIsysroot = this->Makefile->IsOn(isysrootVar.c_str());
bool flagsUsed = false;
if(osxArch && sysroot && lang && (lang[0] =='C' || lang[0] == 'F'))
More information about the Cmake-commits
mailing list