MantisBT - CMake
View Issue Details
0013261CMakeCMakepublic2012-05-30 13:432012-10-01 13:23
Charlie Sharpsteen 
David Cole 
highmajoralways
closedfixed 
AppleOS X
CMake 2.8.8 
CMake 2.8.9CMake 2.8.9 
0013261: Default value of CMAKE_FIND_FRAMEWORK can not be overridden from the command line
`CMAKE_FIND_FRAMEWORK` always has a value of `FIRST` even if a user passes an argument such as `-DCMAKE_FIND_FRAMEWORK=LAST` when configuring a project. This is due to an unguarded default in the platform file `Darwin.cmake` that always overrides user input.

See the following thread on the mailing list for more details:

    http://cmake.3232098.n2.nabble.com/Why-does-CMAKE-FIND-FRAMEWORK-always-default-to-FIRST-ignoring-command-line-definitions-tp7521759.html [^]


Patch attached which adds guards to the default in `Darwin.cmake`. No changes in the CMake testsuite were noticed after applying the patch.
No tags attached.
patch 0001-Add-guards-to-CMAKE_FIND_FRAMEWORK-default.patch (1,025) 2012-05-30 13:43
https://public.kitware.com/Bug/file/4340/0001-Add-guards-to-CMAKE_FIND_FRAMEWORK-default.patch
? 0001-Add-guards-to-CMAKE_FIND_FRAMEWORK-default.patch-2 (1,662) 2012-05-30 14:16
https://public.kitware.com/Bug/file/4341/0001-Add-guards-to-CMAKE_FIND_FRAMEWORK-default.patch-2
Issue History
2012-05-30 13:43Charlie SharpsteenNew Issue
2012-05-30 13:43Charlie SharpsteenFile Added: 0001-Add-guards-to-CMAKE_FIND_FRAMEWORK-default.patch
2012-05-30 13:54Brad KingAssigned To => David Cole
2012-05-30 13:54Brad KingStatusnew => assigned
2012-05-30 13:54Brad KingNote Added: 0029587
2012-05-30 14:08Charlie SharpsteenNote Added: 0029588
2012-05-30 14:10Brad KingNote Added: 0029589
2012-05-30 14:16Charlie SharpsteenFile Added: 0001-Add-guards-to-CMAKE_FIND_FRAMEWORK-default.patch-2
2012-05-30 14:19Charlie SharpsteenNote Added: 0029590
2012-05-31 08:27David ColeTarget Version => CMake 2.8.9
2012-05-31 08:28David ColeNote Added: 0029591
2012-05-31 08:28David ColeStatusassigned => resolved
2012-05-31 08:28David ColeFixed in Version => CMake 2.8.9
2012-05-31 08:28David ColeResolutionopen => fixed
2012-10-01 13:23David ColeNote Added: 0031138
2012-10-01 13:23David ColeStatusresolved => closed

Notes
(0029587)
Brad King   
2012-05-30 13:54   
I think Darwin-icc.cmake may need this too.
(0029588)
Charlie Sharpsteen   
2012-05-30 14:08   
Good catch. Unfortunately, I cannot figure out how to delete my original attachement so that I can upload a corrected patch.
(0029589)
Brad King   
2012-05-30 14:10   
Re 0013261:0029588: Just add a "-2" to the end of the file name and add a second attachment.
(0029590)
Charlie Sharpsteen   
2012-05-30 14:19   
Done. Although it is a bummer that the bugtracker won't let me edit my own bug---it is rare for humans to "get it perfect the first time".
(0029591)
David Cole   
2012-05-31 08:28   
I modified the patch a little bit to remove the verbose endif() and to do the similar thing for the variable 'CMAKE_FIND_APPBUNDLE' as well...

Fix pushed to 'next':

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8b2fb3310b4b8f1d218e479e3f5eafe04e8b8077 [^]
(0031138)
David Cole   
2012-10-01 13:23   
Closing resolved issues that have not been updated in more than 4 months.