[CMake] Why does CMAKE_FIND_FRAMEWORK always default to FIRST ignoring command line definitions?

Charlie Sharpsteen chuck at sharpsteen.net
Tue May 29 14:33:25 EDT 2012


Charlie Sharpsteen wrote
> 
> 
> Rolf Eike Beer wrote
>> 
>> Because those value is set in the Darwin platform file 
>> (Modules/Platform/Darwin.cmake) which is taken into account by the
>> PROJECT() 
>> call. So this is just overridden.
>> 
>> Eike
>> 
> 
> Any reason those definitions can't be protected by `IF(NOT DEFINED
> CMAKE_FIND_FRAMEWORK)`? If I can't override the default from the command
> line, it seems like the only recourse is to maintain patches for every
> project I am trying to build with CMake--a very messy and fragile
> solution.
> 
> -Charlie
> 


I would like to bump this thread again because it is causing us some pain
over on the Homebrew package manager. For example, if the user has installed
a package like the Mono distribution, there are a lot of 32-bit Framworks
that get swept into anything compiled CMake and this breaks the builds:

  https://github.com/mxcl/homebrew/issues/11030

In this situation it would be _really helpful_ to be able to tell CMake, via
the command line, to use our 64-bit libraries first before looking at the
32-bit frameworks. Unfortunately, since the defaults in the platform file
override the command line arguments there is no way to do this without
patching the CMake build files for every software package we manage---an
infeasible solution.

So, is there any reason `IF(NOT DEFINED CMAKE_FIND_FRAMEWORK)` cannot be
used in the platform file to protect command line arguments?

-Charlie

--
View this message in context: http://cmake.3232098.n2.nabble.com/Why-does-CMAKE-FIND-FRAMEWORK-always-default-to-FIRST-ignoring-command-line-definitions-tp7521759p7579586.html
Sent from the CMake mailing list archive at Nabble.com.


More information about the CMake mailing list