[Cmake-commits] [cmake-commits] hoffman committed cmCoreTryCompile.cxx 1.12 1.13
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue May 19 11:25:33 EDT 2009
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv11814
Modified Files:
cmCoreTryCompile.cxx
Log Message:
BUG: fix for #0009051 CMake does not pass CMAKE_OSX_SYSROOT and CMAKE_OSX_DEPLOYMENT_TARGET when running TRY_COMPILE
Index: cmCoreTryCompile.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCoreTryCompile.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -C 2 -d -r1.12 -r1.13
*** cmCoreTryCompile.cxx 29 Jan 2009 20:23:18 -0000 1.12
--- cmCoreTryCompile.cxx 19 May 2009 15:25:28 -0000 1.13
***************
*** 251,254 ****
--- 251,268 ----
cmakeFlags.push_back(flag);
}
+ /* on APPLE also pass CMAKE_OSX_SYSROOT to the try_compile */
+ if(this->Makefile->GetDefinition("CMAKE_OSX_SYSROOT")!=0)
+ {
+ std::string flag="-DCMAKE_OSX_SYSROOT=";
+ flag += this->Makefile->GetSafeDefinition("CMAKE_OSX_SYSROOT");
+ cmakeFlags.push_back(flag);
+ }
+ /* on APPLE also pass CMAKE_OSX_DEPLOYMENT_TARGET to the try_compile */
+ if(this->Makefile->GetDefinition("CMAKE_OSX_DEPLOYMENT_TARGET")!=0)
+ {
+ std::string flag="-DCMAKE_OSX_DEPLOYMENT_TARGET=";
+ flag += this->Makefile->GetSafeDefinition("CMAKE_OSX_DEPLOYMENT_TARGET");
+ cmakeFlags.push_back(flag);
+ }
fprintf(fout, "ADD_EXECUTABLE(cmTryCompileExec \"%s\")\n",source.c_str());
More information about the Cmake-commits
mailing list