MantisBT - CMake
View Issue Details
0009051CMakeCMakepublic2009-05-19 10:132009-05-19 11:25
Michael Wild 
Bill Hoffman 
normalmajoralways
closedfixed 
CMake-2-6 
 
0009051: CMake does not pass CMAKE_OSX_SYSROOT and CMAKE_OSX_DEPLOYMENT_TARGET when running TRY_COMPILE
When one does invokes TRY_COMPILE one would expect that CMake also passes CMAKE_OSX_SYSROOT and CMAKE_OSX_DEPLOYMENT_TARGET to the test project such that it compiles under the same conditions as the actual project will. This is currently not the case and the default values are picked.

See the attached patch for a fix.
No tags attached.
patch fix_cmCoreTryCompile_to_pass_CMAKE_OSX_variables.patch (1,236) 2009-05-19 10:13
https://public.kitware.com/Bug/file/2260/fix_cmCoreTryCompile_to_pass_CMAKE_OSX_variables.patch
Issue History
2009-05-19 10:13Michael WildNew Issue
2009-05-19 10:13Michael WildFile Added: fix_cmCoreTryCompile_to_pass_CMAKE_OSX_variables.patch
2009-05-19 11:10Bill HoffmanNote Added: 0016527
2009-05-19 11:10Bill HoffmanStatusnew => assigned
2009-05-19 11:10Bill HoffmanAssigned To => Bill Hoffman
2009-05-19 11:25Bill HoffmanNote Added: 0016528
2009-05-19 11:25Bill HoffmanNote Added: 0016529
2009-05-19 11:25Bill HoffmanStatusassigned => closed
2009-05-19 11:25Bill HoffmanResolutionopen => fixed

Notes
(0016527)
Bill Hoffman   
2009-05-19 11:10   
I guess why we have not seen this is that we always use the shell environment variables.

export CMAKE_OSX_SYSROOT=...
export OSX_DEPLOYMENT_TARGET=...
cmake ../source

In this case it will work.
(0016528)
Bill Hoffman   
2009-05-19 11:25   
$ cvs commit -m "BUG: fix for 0009051 CMake does not pass CMAKE_OSX_SYSROOT and CMAKE_OSX_DEPLOYMENT_TARGET when running TRY_COMPILE" cmCoreTryCompile.cxx
Committer: Bill Hoffman <bill.hoffman@kitware.com>
/cvsroot/CMake/CMake/Source/cmCoreTryCompile.cxx,v <-- cmCoreTryCompile.cxx
new revision: 1.13; previous revision: 1.12
(0016529)
Bill Hoffman   
2009-05-19 11:25   
Thanks.